[error] PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). 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. However, future versions may not support this any longer. in d:\\path_to_drupal\\modules\\prepopulate\\prepopulate.module on line 59

Seems pass by reference has been deprecated in php5.

Could you please modify it to work with pass by value.

I tried. But could not get working. am not good at playing with such things in php.

Comments

eafarris’s picture

From the php documentation it appears that the ampersand is optional in php5. Could you try changing all instances of "&$form" to simply "$form" and see if that does it? I do not yet have a test environment with php5.

zigma’s picture

I tried removing all ampersand. It does not throw any error. But it does not initialize the forms.

eafarris’s picture

Version: 4.7.x-1.x-dev » 6.x-1.x-dev
Assigned: Unassigned » eafarris
Status: Active » Fixed

Changed all call-time pass-by-reference to accept-by-reference. Should do the trick. Committed to CVS rather than DRUPAL-4-7, apparently I didn't branch the module properly, so please use the CVS version for now.

Anonymous’s picture

Status: Fixed » Closed (fixed)
mikey_p’s picture

Version: 6.x-1.x-dev » 6.x-2.0
Status: Closed (fixed) » Active

Getting this on line 46:

_prepopulate_request_walk(&$form, &$request);

Why is this still there?

jbrauer’s picture

Assigned: eafarris » Unassigned
Status: Active » Closed (fixed)

That doesn't appear on line 46 in any of the current versions of CVS. If there is such a bug in the current version please post a link to the file in CVS with the line number.

mikey_p’s picture