php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54548 needed a way to define multiple error handlers
Submitted: 2011-04-16 20:15 UTC Modified: 2021-08-05 14:08 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: giorgio dot liscio at email dot it Assigned: cmb (profile)
Status: Wont fix Package: Scripting Engine problem
PHP Version: 5.3.6 OS: all
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: giorgio dot liscio at email dot it
New email:
PHP Version: OS:

 

 [2011-04-16 20:15 UTC] giorgio dot liscio at email dot it
Description:
------------
hi, since a lot of [debug]frameworks/libs relies on set_error_handler would be nice to have a way to provide a stack of error handlers (like spl autoload stack, ticks etc)

register_error_handler($callback, /* prepend */ TRUE | FALSE)
and 
unregister_error_handler


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-19 12:06 UTC] alex dot schuch at gmx dot de
I have encountered the very same problem.

set_error_handler() returns the previously installed error handler, so maybe it can be called using call_user_func() somehow. The example (PHP manual) of set_error_handler() actually stores the previously installed error handler but does not use it.
 [2021-08-05 14:08 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-08-05 14:08 UTC] cmb@php.net
Given there was no traction on this ticket for more than ten
years, and that it is already possible to call the previously set
error handler from your own error handler, I'm closing this as
WONTFIX.

If anybody still feels this would be a valuable feature addition,
please pursue the RFC process[1].

[1] <https://wiki.php.net/rfc/howto>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 01:01:30 2024 UTC