#47121 [Tbd->Csd]: Cannot suppress warnings for "Call-time pass by reference is deprecated"
| From: | kalle@php.net | Date: | Fri, 18 Dec 2009 06:04:50 +0000 |
| Subject: | #47121 [Tbd->Csd]: Cannot suppress warnings for "Call-time pass by reference is deprecated" | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-3503@lists.php.net to get a copy of this message | ||
ID: 47121
Updated by: kalle@php.net
Reported By: david at ethos-consulting dot com
-Status: To be documented
+Status: Closed
Bug Type: Documentation problem
Operating System: MacOS X 10.5.6
PHP Version: 5.2.8
-Assigned To:
+Assigned To: kalle
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2009-12-18 06:04:12] svn@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=292279
Log: Fixed bug #47121 (Cannot suppress warnings for "Call-time pass by
reference is deprecated")
------------------------------------------------------------------------
[2009-01-16 11:23:32] jani@php.net
"This should be mentioned in the documentation." was for mentioning in
docs that "allow_call_time_pass_reference" warning's error level is
E_COMPILE_WARNING of course. :)
------------------------------------------------------------------------
[2009-01-16 11:21:55] jani@php.net
It's actually E_COMPILE_WARNING and you can not suppress those from a
script, you have to set it in either php.ini or .htaccess.
This should be mentioned in the documentation.
------------------------------------------------------------------------
[2009-01-16 02:33:30] david at ethos-consulting dot com
Description:
------------
I have a legacy PHP4 application running under PHP5 with additional
components built in Zend Framework. Several of the legacy classes
utilize call-time pass-by-reference when invoking their methods, for
historical reasons, which is deprecated behavior in PHP5 and displays a
message of level E_WARNING, appropriately:
Warning: Call-time pass-by-reference has been deprecated; 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 in /path/to/script.php on line ##
I have set and confirmed the error reporting bitmask at 6133 (all minus
E_NOTICE and E_WARNING) via .htaccess directives (php_value) and PHP's
error_reporting() function. However, I continue to see the warning
message on my local development machine. Setting the prescribed ini
setting seems to be the only way to suppress the warnings. Are these not
regular E_WARNING level messages?
Reproduce code:
---------------
<?php
error_reporting(6133);
function something ( $argument )
{
echo 'I do nothing...';
} // END something
$variable = '123';
something(&$variable);
Expected result:
----------------
I do nothing...
Actual result:
--------------
Warning: Call-time pass-by-reference has been deprecated; If you would
like to pass it by reference, modify the declaration of [something]().
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 in
/path/to/script.php on line 11
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47121&edit=1