Author Topic: Warning: Call-time pass-by-reference has been deprecated  (Read 1403 times)

0 Members and 1 Guest are viewing this topic.

NickM

  • Guest
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 vlibTemplate.php on line 421

same warning for line 431 and 441

I only get this warning when on the net (on the *nix server), not when testing locally (Win XP).
Any ideas how to fix this?
(My page displays OK, but the warning also displays on the page).
I'm using the latest version of vLib401-rc1

releasedj

  • Guest
Warning: Call-time pass-by-reference has been deprecated
Reply #1 on: Mon, 16. June 2003 - 13:37:30
To fix this, goto each line that you mentioned and replace &$r with $r.

I'll change this in CVS shortly.

Regards,

Kelvin

NickM

  • Guest
Warning: Call-time pass-by-reference has been deprecated
Reply #2 on: Mon, 16. June 2003 - 14:02:05
Thanks Kelvin.
Perfect solution.
I wonder if anyone else had seen this?
What is the reason for it - latest version of PHP perhaps?

releasedj

  • Guest
Warning: Call-time pass-by-reference has been deprecated
Reply #3 on: Mon, 16. June 2003 - 14:06:01
Yep,

Before PHP 4.0.6 I think, you had to pass variables by reference when you were calling a function, now you just need to specify this in the function declaration.

This is why it started showing up. Also, if your error handling is set to ignore warnings on one if the setups, it wouldn't have shown.

Regards,

Kelvin