3

In Drupal 7, I'm getting this error and want to fix it:

  • Warning: array_merge() [function.array-merge]: Argument #1 is not an array in _form_set_class() (line 4021 of {my site}/includes/form.inc).
  • Warning: array_merge() [function.array-merge]: Argument #1 is not an array in _form_set_class() (line 4021 of {my site}/includes/form.inc).
  • Warning: implode() [function.implode]: Invalid arguments passed in theme_radios() (line 2746 of {my site}/includes/form.inc).

What does this mean, and what should I do about it?

2
  • What you did do cause the error would be most helpful to know.
    – Letharion
    Jan 23 '12 at 8:05
  • I had the same problem, when I uninstalled the module Custom Breadcrumbs (7.x-1.x-dev) and reinstalled again, it was solved.
    – user5289
    Jan 31 '12 at 20:27
9

For me it happened; when I used

$form['field']['#attributes'] = array('class' => 'myclass');

While it should be

$form['field']['#attributes'] = array('class' => array('myclass'));

1

There's likely a buggy FAPI definition. Are you developing a form? If so, check your form definition. It's not being returned as an array.

0

So i figured it out, I wasn't sure what I had done to make this start happening, but it was being caused by the "Drupal for Facebook" module. It was only popping up when I was on a node edit page strangely. For those familiar, I had the "FB User Management" enabled and after disabling, it stopped giving me the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.