Bug #7488 Updated: Pass-by-reference problem
| From: | kalowsky@php.net | Date: | Thu, 19 Apr 2001 02:33:32 +0000 |
| Subject: | Bug #7488 Updated: Pass-by-reference problem | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-51918@lists.php.net to get a copy of this message | ||
ID: 7488
Updated by: kalowsky
Reported By: torben@php.net
Old-Status: Open
Status: Closed
Bug Type: ODBC related
PHP Version: 4.0 Latest CVS (27/10/2000)
Assigned To:
Comments:
tested your supplied patch, and it seems to be working on Windows, so I'm commiting. Please
have others test too!
Previous Comments:
---------------------------------------------------------------------------
[2001-03-27 15:31:59] torben@php.net
Yup. Here's a breakdown:
Using & | allow_call_time_pass_by_reference | Works? | Err?
-----------------------------------------------------------
Yes | On | Yes | No
No | On | No | No
Yes | Off | Yes | Yes
No | Off | No | No
Which is weird. When I get the error telling me that my
arg has been passed by value, it's actually been passed
by reference.
I also think perhaps that it's just generally a bad idea
for a function to depend upon deprecated features of the
language, since at the moment it requires call-time
pass-by-ref to work.
---------------------------------------------------------------------------
[2001-03-27 10:49:47] kalowsky@php.net
is this still the case?
---------------------------------------------------------------------------
[2000-10-27 05:07:08] torben@php.net
When calling odbc_fetch_into() with three arguments, all works as
expected: the result array is passed by reference and results are
placed into it. But when using the two-parameter form, the result
array becomes the second parameter, which must be passed like this:
odbc_fetch_into($rid, &$arr);
in order to have the results placed into $arr. If the & is left out, $arr
is not modified. However, using & results in the large compile-time error
being printed at the beginning of script output unless it's been masked
out in php.ini, since forcing pass-by-ref this way is no longer supported.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=7488&edit=2