Greetings!

In opengraph_meta.module
121 '#attributes' => array('class' => 'opengraph-thumbs-wrapper clearfix'),
should be:
121 '#attributes' => array('class' => array('opengraph-thumbs-wrapper','clearfix')),
or you get this when you edit a node:
Warning: array_merge(): Argument #1 is not an array in array_merge() (line 4044 of /var/lib/drupal-7.12/includes/form.inc).

Rightfully so! It isn't an array.

Thank for your work!!

Chad Matsalla

CommentFileSizeAuthor
#6 opengraph_meta-1427430-6.patch973 bytesjoostvdl
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alfaiataria’s picture

I'm getting the warning and I tried to edit the opengraph_meta.module (copy/pasted, double checked) but I got an internal 500 error after the changes.
Any ideas why?

Goekmen’s picture

I think there is a missing bracket:

'#attributes' => array('class' => array('opengraph-thumbs-wrapper','clearfix')),

The fix worked for me!

candotri’s picture

Good call people. I was sloppy with cutting and pasting.

carl.brown’s picture

Title: Array merge, not an array » Warning: array_merge() [function.array-merge]: Argument #1 is not an array in _form_set_class()

I too was getting this same problem, only the PHP error read slightly differently, so it took me a while to find this issue:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in _form_set_class() (line 4044 of C:\wamp2.2a\www\drupal-7.12\includes\form.inc).
Warning: implode() [function.implode]: Invalid arguments passed in theme_radios() (line 2748 of C:\wamp2.2a\www\drupal-7.12\includes\form.inc).

I've updated the title to make this issue easier to find in search engines (to hopefully save someone else the same headache I've just had!).

Thanks for the fix, it works perfectly now.

candotri’s picture

Hi Everyone,

I added the missing ")" in the original post to make sure that copy-and-paste'rs are getting the correct code.

Chad Matsalla

joostvdl’s picture

FileSize
973 bytes

Patch attached

larowlan’s picture

Status: Active » Reviewed & tested by the community

Works for me

richardj’s picture

Works for me

dcolin’s picture

Works for me too ! Thx a lot.

karc2009’s picture

Title: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in _form_set_class() » Thanks a lot!

Your are my hero!

jlea9378’s picture

Title: Thanks a lot! » Warning: array_merge() [function.array-merge]: Argument #1 is not an array in _form_set_class()

setting title back

bryancasler’s picture

#6 worked for me

nicholasThompson’s picture

#6 also worked for me too. Please commit and tag a 1.3 :-)

Cameron Tod’s picture

Would love a 1.3 with this in it :)

Sivaji_Ganesh_Jojodae’s picture

Strictly speaking #6 needs work because a space is missing after comma otherwise it looks good to commit :-)

-        '#attributes' => array('class' => 'opengraph-thumbs-wrapper clearfix'),
+        '#attributes' => array('class' => array('opengraph-thumbs-wrapper', 'clearfix')),
Sivaji_Ganesh_Jojodae’s picture

Issue summary: View changes

Added the missing ")"

  • hiddentao committed d1ce595 on 7.x-2.x
    Issue #1427430 by joostvdl: Fix array_merge error.
    
    
torotil’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

This has been fixed for a long time.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.