[PHP-BUG] Bug #63729 [NEW]: E_DEPRECATED errors is not handled properly

2012-12-08 Thread dinoel at gmail dot com
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 




testfile1.php


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



Bug #63729 [Opn]: E_DEPRECATED errors is not handled properly

2012-12-08 Thread dinoel at gmail dot com
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 




testfile1.php


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


Bug #63729 [Fbk->Opn]: E_DEPRECATED errors is not handled properly

2012-12-10 Thread dinoel at gmail dot com
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: Feedback
+Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   windows
 PHP Version:5.4.9
 Block user comment: N
 Private report: N

 New Comment:

Hi,

Yes, if you run testfile.php then error error reporting setting takes effect, 
but if you run testfile1.php then it does not. Please run testfile1.php (as 
explained in description) and you will see what i mean. 
This is clean install and no opcode caches/debug extensions been loaded.


Previous Comments:

[2012-12-10 02:22:27] ahar...@php.net

I can't reproduce this on 5.3 or 5.4: as expected, if I run testfile.php, the 
error reporting setting takes effect and hides the deprecation warning in the 
included file.

What extensions do you have loaded? In particular, opcode caches and debugging 
extensions like xdebug and scream would be interesting, but a full list would 
be good.


[2012-12-08 20:34:38] dinoel at gmail dot com

Happens on 5.3.19 also.


[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 




testfile1.php


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