Notices and warnings in layout_builder_modal_link_alter

Created on 21 July 2020, over 4 years ago
Updated 23 May 2024, 6 months ago

After add or update the block (view listing, in particular) in a layout override getting such messages in the dblog:

Notice: Undefined index: class in layout_builder_modal_link_alter() (line 57 of /var/www/web/modules/contrib/layout_builder_modal/layout_builder_modal.module)
#0 /var/www/web/core/includes/bootstrap.inc(600): _drupal_error_handler_real(8, 'Undefined index...', '/var/www/web/mo...', 57, Array)
#1 /var/www/web/modules/contrib/layout_builder_modal/layout_builder_modal.module(57): _drupal_error_handler(8, 'Undefined index...', '/var/www/web/mo...', 57, Array)
.....
Warning: in_array() expects parameter 2 to be array, null given in layout_builder_modal_link_alter() (line 57 of /var/www/web/modules/contrib/layout_builder_modal/layout_builder_modal.module)
#0 /var/www/web/core/includes/bootstrap.inc(600): _drupal_error_handler_real(2, 'in_array() expe...', '/var/www/web/mo...', 57, Array)
#1 [internal function]: _drupal_error_handler(2, 'in_array() expe...', '/var/www/web/mo...', 57, Array)

The problem is that there are not enough checks in the above hook implementation.

πŸ› Bug report
Status

RTBC

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine NightHunterSV

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024