Bug #63729 [NEW]: E_DEPRECATED errors is not handled properly
From: dinoel at gmail dot com
Operating system: windows
PHP version: 5.4.9
Package: Output Control
Bug Type: Bug
Bug description:E_DEPRECATED errors is not handled properly
Description:
------------
Hi,
E_DEPRECATED is not handled properly if error handler / error reporting is
set in same file.
pre-requirements : error_reporting set to E_ALL in php.ini file
I assume this is because E_DEPRECATED error is fired on "compile" time, not
execution time..
Please notice that this problem happens only with " =& new ..."
constructions (and probably some others) , other kind of E_DEPRECATED
errors (like one which fired when i'm using deprecated functions, like
ereg) are handled as expected.
This bug is probably related : https://bugs.php.net/bug.php?id=61031
Test script:
---------------
testfile.php
<?php
error_reporting(0);
include('testfile1.php');
?>
testfile1.php
<?php
error_reporting(0);
class foo {
}
$a =& new foo();
echo "success";
?>
Expected result:
----------------
php -f testfile.php
success
php -f testfile1.php
success
Actual result:
--------------
php -f testfile.php
"success"
php -f testfile1.php
PHP Deprecated: Assigning the return value of new by reference is
deprecated in
testfile1.php on line 6
Deprecated: Assigning the return value of new by reference is deprecated in
testfile1.php on line 6
success
--
Edit bug report at https://bugs.php.net/bug.php?id=63729&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63729&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63729&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63729&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=63729&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=63729&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63729&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=63729&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=63729&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=63729&r=support
Expected behavior: https://bugs.php.net/fix.php?id=63729&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=63729&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=63729&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=63729&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63729&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=63729&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=63729&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=63729&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63729&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63729&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=63729&r=mysqlcfg
Thread (5 messages)
- dinoel at gmail dot com