warning: array_merge_recursive() [function.array-merge-recursive]:
Scott Falconer - April 29, 2007 - 20:32
| Project: | GMap Module |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I'm getting a "warning: array_merge_recursive() [function.array-merge-recursive]: Argument #1 is not an array in /home/public_html/includes/common.inc on line 1667." message using the newest gmap 5.x-1.dev release. Gmap worked find before this version. We're running in php 5. Any ideas?

#1
Same problem as well!
#2
me too!
#3
Same. I've narrowed it down to the following line:
<?phpdrupal_add_js(drupal_to_js(array('gmap_markermanager'=>$mms[$mm])),'setting');
?>
If you comment that out, it works, but I assume that line is necessary for something. ;)
#4
I *think* this fixes it?
#5
DOH! I see what we're getting at here.
OK, the problem was that there are no options for the unmanaged case. For some reason, my site doesn't complain about this and just sends NULL.
So, I should do an empty() check and use array() instead in this case... That should work.
#6
OK, committed a workaround to use array() for a case where there are no settings.
Also fixed a bug that was causing location chooser to not work, but that's another bug.
Please test the next snapshot.
Thanks!
#7
That did fix the error on my install, however now there is another error when you very first go to the GMap settings page (to reproduce, click the "Reset to defaults" button):
warning: Cannot use a scalar value as an array in /Applications/MAMP/htdocs/bigmindgroups/public_html/sites/groups/modules/drupal-contrib/gmap/gmap.module on line 133.As soon as you save the form, it goes away.
This seems to fix it.
#8
OK. Committed.
#9
Works for me!
#10