Hi all,
One of our modules uses CSS classes assigned to links and buttons to add custom logic. From this module we receive multiple warnings that:
Warning: in_array() expects parameter 2 to be array, string given in func()...
According to Drupal 7.x documentation attribute 'class' should be an array: https://api.drupal.org/api/drupal/developer%21topics%21forms_api_referen...
One of the places where we identified the problem is line where implode function is executed:
'class' => implode(' ', $menu_classes),
which can be changed to simply:
'class' => $menu_classes,
Comments
Comment #2
veret commentedAttaching file with patch which removes
implode()function.Comment #3
cameron tod commentedComment #5
cameron tod commentedCommited with attribution. Thanks!