Re: PHP warning with 4.2
| From: | Nick Oostveen | Date: | Thu, 08 Aug 2002 20:56:56 +0000 |
| Subject: | Re: PHP warning with 4.2 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111735@lists.php.net to get a copy of this message | ||
You should be able to fix this by changing the function DECLARATION for the argument in question to take the variable by reference instead of by value (which is the default).
So it should be something like:
OCIFetchInto ( $var1, &$rvar2, $var3 )
What you are currently doing is specifying at call-time that "I want you to accept this variable by reference, even if you are expecting it to be passed by value". This can be very dangerous from a data corruption point of view, which is likely why it is being deprecated.
At 11:13 AM 8/8/2002 -0700, PHP List wrote:
Hi, after upgrading to 4.2, I seem to be getting this warning: 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. on this line: OCIFetchInto ( $GLOBALS["oracle_statement"], &$row, OCI_NUM + OCI_RETURN_NULLS ) if I can't use &$row anymore, what do I do? The warning says that "future versions may not support this", so will this function be fixed? Or will this function be dissappearing? Thanks for any help.