Commit 1ee3efdf authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#202184 by Rho_pare: fix drupal_alter() not checking for having an array, broken by #192767

parent c8826a6b
...@@ -2845,7 +2845,7 @@ function drupal_alter($type, &$data) { ...@@ -2845,7 +2845,7 @@ function drupal_alter($type, &$data) {
// array. This is somewhat ugly, but is an unavoidable consequence of a flexible // array. This is somewhat ugly, but is an unavoidable consequence of a flexible
// drupal_alter() function, and the limitations of func_get_args(). // drupal_alter() function, and the limitations of func_get_args().
// @todo: Remove this in Drupal 7. // @todo: Remove this in Drupal 7.
if (isset($data['__drupal_alter_by_ref'])) { if (is_array($data) && isset($data['__drupal_alter_by_ref'])) {
$by_ref_parameters = $data['__drupal_alter_by_ref']; $by_ref_parameters = $data['__drupal_alter_by_ref'];
unset($data['__drupal_alter_by_ref']); unset($data['__drupal_alter_by_ref']);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment