array_merge problem after realname installation

tayzlor - June 1, 2009 - 15:02
Project:RealName
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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?

#1

black silence - June 15, 2009 - 12:13
Status:active» needs review

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?

AttachmentSize
realname-array_merge.patch 562 bytes

#2

NancyDru - October 1, 2009 - 15:16

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

#3

NancyDru - October 1, 2009 - 15:28
Status:needs review» fixed

Fixed by #579040: Some bugfixes.

#4

NancyDru - October 14, 2009 - 23:13
Status:fixed» closed

Included in 6.x-1.3

 
 

Drupal is a registered trademark of Dries Buytaert.