Bug #66291 [Nab]: Problem with error_reporting

From: Date: Sun, 15 Dec 2013 00:46:43 +0000
Subject: Bug #66291 [Nab]: Problem with error_reporting
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183334@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 Updated by: requinix@php.net 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: Regarding /e? Yes, that was deprecated in 5.5.0. http://www.php.net/ChangeLog-5.php#5.5.0 Previous Comments: ------------------------------------------------------------------------ [2013-12-14 11:57:54] tmop at clix dot pt The only issue for me is that the behaviour changed from 5.4 to 5.5 Thanks for the answer. ------------------------------------------------------------------------ [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

« previous php.bugs (#183334) next »