php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9779 error_reporting() settings ate not respected when custom error handler is set
Submitted: 2001-03-16 04:20 UTC Modified: 2001-03-16 04:36 UTC
From: kot at books dot ru Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.4pl1 OS: Linux
Private report: No CVE-ID: None
 [2001-03-16 04:20 UTC] kot at books dot ru
If a custom error handler is set (using set_error_handler()), error_reporting settings are not respected - errors of E_ALL level are reported to the custom handler, even if something else (e.g. E_PARSE level) is set using error_reporting().

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-16 04:36 UTC] torben@php.net
Yes, that's by design.

error_reporting() allows you to select which
errors are shown, while still allowing you to react to errors which,
for instance, you might prefer that the user not see. 

If you do not wish to cope with or know about a certain kind of 
error, simply have your error handler ignore it.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC