Bug #66291 [Nab]: Problem with error_reporting

From: Date: Sat, 14 Dec 2013 11:57:54 +0000
Subject: Bug #66291 [Nab]: Problem with error_reporting
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183331@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66291&edit=1

 ID:                 66291
 User updated by:    tmop at clix dot pt
 Reported by:        tmop at clix dot pt
 Summary:            Problem with error_reporting
 Status:             Not a bug
 Type:               Bug
 Package:            Unknown/Other Function
 Operating System:   Ubuntu
 PHP Version:        5.5.7
 Block user comment: N
 Private report:     N

 New Comment:

The only issue for me is that the behaviour changed from 5.4 to 5.5

Thanks for the answer.


Previous Comments:
------------------------------------------------------------------------
[2013-12-13 18:27:09] requinix@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

error_reporting only affects PHP's built-in error handling routine. If you establish your own
handler with set_error_handler() then you need to take into account error_reporting yourself: as the
mask given to set_error_handler() or inside the handler itself.

Similarly error_reporting only affects error *reporting*. The errors will still happen regardless of
the setting.

------------------------------------------------------------------------
[2013-12-13 17:46:27] tmop at clix dot pt

Description:
------------
I'm using this config on php.ini
error_reporting = E_ALL & ~E_STRICT & ~E_DEPRECATED

I convert errors to exceptions and i have this.
set_error_handler('bobErrorHandler');

Even with deprecated disabled i get: 
Exception_Error | 17782b6ec028fc3bcc578ccdadb04b70 | E_DEPRECATED preg_replace(): The /e modifier is
deprecated, use preg_replace_callback instead
in /var/www/HOTFIX_Backend_Sprint_71/library/Zend/Filter/PregReplace.php (171)

I've managed to remove the error with this:
set_error_handler('bobErrorHandler', ini_get('error_reporting'));

but when i call:
$error = error_get_last();

i still get:
array(4) {
  ["type"] => int(8192)
  ["message"] => string(80) "preg_replace(): The /e modifier is deprecated, use
preg_replace_callback instead"
  ["file"] => string(69)
"/var/www/HOTFIX_Backend_Sprint_71/library/Zend/Filter/PregReplace.php"
  ["line"] => int(171)
}
'



Expected result:
----------------
No deprecated stuff when its disabled 



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=66291&edit=1


Thread (4 messages)

« previous php.bugs (#183331) next »