#47121 [Tbd]: Cannot suppress warnings for "Call-time pass by reference is deprecated"
| From: | jani@php.net | Date: | Fri, 16 Jan 2009 11:23:32 +0000 |
| Subject: | #47121 [Tbd]: 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-1719@lists.php.net to get a copy of this message | ||
ID: 47121
Updated by: jani@php.net
Reported By: david at ethos-consulting dot com
Status: To be documented
Bug Type: Documentation problem
Operating System: MacOS X 10.5.6
PHP Version: 5.2.8
New Comment:
"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. :)
Previous Comments:
------------------------------------------------------------------------
[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