TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in in_array() (line 12 of themes/contrib/gin/includes/table.theme)

Created on 15 July 2023, over 1 year ago

Problem/Motivation

When trying to see the node revision page, it will throw the following error:

TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in in_array() (line 12 of themes/contrib/gin/includes/table.theme)

Proposed resolution

Change
if (isset($variables['attributes']['class']) && in_array('field-multiple-table', $variables['attributes']['class']))
to if (isset($variables['attributes']['class']) && is_array($variables['attributes']['class']) && in_array('field-multiple-table', $variables['attributes']['class']))

🐛 Bug report
Status

Closed: duplicate

Component

Code

Created by

🇷🇴Romania alex_branescu

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

Comments & Activities

Production build 0.71.5 2024