ID:               31675
 Updated by:       [EMAIL PROTECTED]
 Reported By:      zxd at zhangxiaodong dot net
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: RedHat Linux AS3 2.4.21-20 i686
 PHP Version:      5.0.3
 New Comment:

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.

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


Previous Comments:
------------------------------------------------------------------------

[2005-01-24 07:35:16] zxd at zhangxiaodong dot net

Description:
------------
when call restore_error_handler() inside an error handler function, it
not works.

Reproduce code:
---------------
<?php

function t35_handler($no, $msg){
    echo __LINE__.__METHOD__."\n";
    restore_error_handler();
    echo __LINE__.__METHOD__."\n";
}
function t35(){
    echo "old handler=".set_error_handler("t35_handler")."\n";
    trigger_error("error1");
    echo "old handler=".set_error_handler("t35_handler")."\n";
    trigger_error("error2");
}


?>

Expected result:
----------------
old handler=
4t35_handler
6t35_handler
old handler=
4t35_handler
6t35_handler


Actual result:
--------------
old handler=
4t35_handler
6t35_handler
old handler=t35_handler
4t35_handler
6t35_handler



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


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

Reply via email to