[php-maint] Bug#632838: cannot surpress deprecated warning with "error_reporting = E_ALL & ~E_DEPRECATED"

Raoul Bhatia [IPAX] r.bhatia at ipax.at
Wed Jul 6 11:06:33 UTC 2011


Package: php5-cli
Version: 5.3.3-7+squeeze3
Severity: important

deprecation warnings are still shown if error_reporting is set to
error_reporting = E_ALL & ~E_DEPRECATED.

error_reporting = E_ALL & ~E_WARNING incorrectly disables the
deprecation warning.

sample php.ini files with deprecated option set "register_long_arrays".

p1.ini
> [PHP]
> error_reporting = E_ALL & ~E_DEPRECATED
> error_logging = STDOUT
> register_long_arrays = On

p2.ini
> [PHP]
> error_reporting = E_ALL & ~E_WARNING
> error_logging = STDOUT
> register_long_arrays = On


"error_reporting = E_ALL & ~E_DEPRECATED" does not suppress the warning
> raoul at dev64:~$ php -nc p1.ini -r 'echo "test\n";'
> 
> Warning: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
> test

"error_reporting = E_ALL & ~E_WARNING" successfully suppresses the
warning but actually is incorrect
> raoul at dev64:~$ php -nc p2.ini -r 'echo "test\n";'
> test



this issue has been brought up in different bugs.php.net reports, but i
did not find a proper solution:

https://bugs.php.net/bug.php?id=50251#1258845114 (2009-11-21 23:11 UTC)
https://bugs.php.net/bug.php?id=49362#1269367386 (2010-03-23 18:03 UTC)

i kindly ask you to look into this issue!

thanks,
raoul





More information about the pkg-php-maint mailing list