From: david at ethos-consulting dot com
Operating system: MacOS X 10.5.6
PHP version: 5.2.8
PHP Bug Type: PHP options/info functions
Bug description: Cannot suppress warnings for "Call-time pass by reference is
deprecated"
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 bug report at http://bugs.php.net/?id=47121&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47121&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47121&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47121&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47121&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=47121&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47121&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=47121&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=47121&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=47121&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=47121&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=47121&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=47121&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=47121&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47121&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47121&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47121&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=47121&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=47121&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=47121&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=47121&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=47121&r=mysqlcfg