Bug #63729 [Opn]: E_DEPRECATED errors is not handled properly
| From: | dinoel at gmail dot com | Date: | Sat, 08 Dec 2012 20:34:39 +0000 |
| Subject: | Bug #63729 [Opn]: E_DEPRECATED errors is not handled properly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-175217@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63729&edit=1
ID: 63729
User updated by: dinoel at gmail dot com
Reported by: dinoel at gmail dot com
Summary: E_DEPRECATED errors is not handled properly
Status: Open
Type: Bug
Package: Output Control
Operating System: windows
PHP Version: 5.4.9
Block user comment: N
Private report: N
New Comment:
Happens on 5.3.19 also.
Previous Comments:
------------------------------------------------------------------------
[2012-12-08 20:32:22] dinoel at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=63729&edit=1