> -----Original Message-----
> From: PHP List [mailto:[EMAIL PROTECTED]]
> Sent: 08 August 2002 19:14
> 
> 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.  

That probably means your error-reporting level has changed, since that
warning has been around for some time (since at least 4.0.6 to my certain
knowledge).

> 
> 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? 

Simply remove the & -- in fact, you never needed it as the definition of the
OCIFetchInto() function itself specifies that the second argument must be
passed by reference.  The description of OCIFetchInto() in the PHP manual
as:

    int OCIFetchInto ( int stmt, array & result [, int mode])

corresponds to a PHP function defined like this:

    function OCIFetchInto ( stmt, &result, mode=OCI_NUM) 
    {
        ...
    }

so the result parameter is *always* passed by reference, whether or not you
put a reference in the call.  This define-time call by reference is *not*
deprecated, and indeed was recommended as the preferred way even before
call-time pass by reference was deprecated.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to