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!
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | gmaps-pass_by_reference-818710-8.patch | 1.3 KB | blacklabel_tom |
| #1 | reference.patch | 1.04 KB | sreynen |
Comments
Comment #1
sreynen commentedThis 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.
Comment #2
michellezeedru commentedThanks - 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.
Comment #3
sreynen commentedmichellezee_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.
Comment #4
michellezeedru commentedAh 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.
Comment #5
xmarket commentedAlready fixed in dev
Comment #7
n_nelson350 commentedif #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);
Comment #8
blacklabel_tom commentedI 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
Comment #9
oxrc commentedHey 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.
Comment #10
n_nelson350 commented