Argument #2 ($haystack) must be of type array, null given in array_search()

Created on 11 March 2024, 9 months ago

Problem/Motivation

TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given in array_search() (line 90 of modules/contrib/layout_builder_st/src/Element/LayoutBuilder.php).

Steps to reproduce

Translate node and try to open the layout builder of this translation. The error happens, if a placed block ($region_build[$uuid]) has no class attribute.

Proposed resolution

add isset($region_build[$uuid]['#attributes']['class'])

🐛 Bug report
Status

Needs review

Component

Code

Created by

🇩🇪Germany Duwid

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

Comments & Activities

Production build 0.71.5 2024