Just installed Gmaps 2.1, and am getting this error frequently:

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of drupal_get_form(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/pota/davisandgoodwin2.michellezee.me/sites/all/modules/gmaps/includes/gmaps.map-admin.inc on line 806

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of drupal_get_form(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/pota/davisandgoodwin2.michellezee.me/sites/all/modules/gmaps/includes/gmaps.map-admin.inc on line 822

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of drupal_get_form(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/[mysite]/sites/all/modules/gmaps/includes/gmaps.map-admin.inc on line 822

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of drupal_get_form(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/[mysite]/sites/all/modules/gmaps/includes/gmaps.map-admin.inc on line 845

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of drupal_get_form(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/[mysite]/sites/all/modules/gmaps/includes/gmaps.map-admin.inc on line 845

I've looked at the referenced lines in gmaps.map-admin.inc, which are, respectively:
return drupal_get_form('gmaps_map_form', &$map, $info);
return drupal_get_form('gmaps_map_form', &$map, &$info);
return drupal_get_form('gmaps_map_form', &$map, &$info, TRUE);

Can anyone help me with this? Thanks in advance!

Comments

sreynen’s picture

Status: Active » Needs review
StatusFileSize
new1.04 KB

This is a deprecated coding style in recent versions of PHP. The attached patch should change the style (without changing the functionality at all) to avoid this error.

michellezeedru’s picture

Status: Needs review » Active

Thanks - I first checked, and it looked like the changes the patch was making were already present in includes/gmaps.map-admin.inc. I applied the patch anyway, in case I overlooked something, but the error is still showing.

sreynen’s picture

michellezee_dru, I'm doubly confused. First, those changes weren't already present in the code you quoted, so I'm not sure what you mean by that. Second, those changes completely remove the call-time pass-by-reference, so I don't see how you could still be getting that error.

michellezeedru’s picture

Ah ha, my bad. I misread the patch, seeing now it was removing the $'s, not adding them. I'll try again to be sure the patch was applied and see what happens.

xmarket’s picture

Status: Active » Fixed

Already fixed in dev

Status: Fixed » Closed (fixed)

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

n_nelson350’s picture

if #1 does not work, then try doing this:

Go to >> gmaps.map-pages.inc under includes of gmaps module and change the following line:
array_unshift($args, &$gmi); to array_unshift($args, $gmi);

blacklabel_tom’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1.3 KB

I realize this is 2 years too late, but here is a patch with the changes from #1 in and the additional fix from #7.

This applies to the 6.x-2.1 branch only.

Cheers

Tom

oxrc’s picture

StatusFileSize
new1.29 KB

Hey there,

I've tried the patch from #8, but it failed to apply. I've corrected it and here's the version that worked for me - against the same 6.x-2.1 branch.

n_nelson350’s picture

Status: Needs review » Closed (outdated)

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.