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?

CommentFileSizeAuthor
#7 gmap_2.patch657 byteswebchick
#4 gmap_1.patch876 byteswebchick

Comments

poolplayr’s picture

Same problem as well!

fm’s picture

me too!

webchick’s picture

Same. I've narrowed it down to the following line:

drupal_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. ;)

webchick’s picture

Status: Active » Needs review
StatusFileSize
new876 bytes

I *think* this fixes it?

bdragon’s picture

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.

bdragon’s picture

Status: Needs review » Postponed (maintainer needs more info)

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!

webchick’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new657 bytes

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.

bdragon’s picture

Status: Needs review » Postponed (maintainer needs more info)

OK. Committed.

webchick’s picture

Status: Postponed (maintainer needs more info) » Fixed

Works for me!

Anonymous’s picture

Status: Fixed » Closed (fixed)