php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66195 restore_error_handler() from the error_handler
Submitted: 2013-11-28 21:30 UTC Modified: 2013-12-04 12:06 UTC
From: david at grudl dot com Assigned: krakjoe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
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: david at grudl dot com
New email:
PHP Version: OS:

 

 [2013-11-28 21:30 UTC] david at grudl dot com
Description:
------------
In documentation http://us2.php.net/restore_error_handler is note:

> Calling restore_error_handler() from the error_handler function is ignored.

I've tried it in all PHP versions from 5.3.0 to 5.5.6 and it seems that it works and is not ignored.

Test script:
---------------
<?php

set_error_handler(function() {
	echo 'one';
});

set_error_handler(function() {
	echo 'two';
    restore_error_handler();
});

trigger_error('', E_USER_NOTICE);
trigger_error('', E_USER_NOTICE);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-04 12:06 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=332260
Log: fix #66195 restore error handler is not ignored (zend_builtin_functions.c#1570)
 [2013-12-04 12:06 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2013-12-04 12:06 UTC] krakjoe@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:08 UTC] phpdocbot@php.net
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=13bf1bc8f52ce8b4e26a2887313bcb3f1e00d36d
Log: fix #66195 restore error handler is not ignored (zend_builtin_functions.c#1570)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 10:01:31 2024 UTC