warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\Boston\Connect\www\sites\all\modules\contribs\realname\realname_theme.inc on line 43.

I get the above error after installing the realname module. Not sure exactly what's causing it, since checking $options is actually just an empty array, so array_merge should still work, but it doesnt seem to be. perhaps check if $options is not empty first before trying to merge the two?

CommentFileSizeAuthor
#1 realname-array_merge.patch562 bytesblack silence

Comments

black silence’s picture

Status: Active » Needs review
StatusFileSize
new562 bytes

some modules (guestbook in my case) call theme('username', ...) with a string instead of an array as $options

attached patch fixes this by casting $options to an array. if $options was a string then that string will be $options[0]

but maybe this should be fixed in the other modules?

nancydru’s picture

There is a competing module that uses string options; they are obviously testing with that one.

nancydru’s picture

Status: Needs review » Fixed
nancydru’s picture

Status: Fixed » Closed (fixed)

Included in 6.x-1.3