|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-04-05 15:09 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 18:00:02 2025 UTC |
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