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

Created on 3 August 2023, 11 months ago
Updated 18 March 2024, 3 months ago

I am getting the following error when adding a block with this module enabled on Drupal 10

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

This is caused by the following line of code, when $variables['options']['attributes']['class'] is not set.

  if (in_array('use-ajax', $variables['options']['attributes']['class'])) {
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇷🇴Romania stefan.butura

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

Comments & Activities

Production build 0.69.0 2024