|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-02-27 15:45 UTC] php at maisqi dot com
[2013-02-28 02:41 UTC] laruence@php.net
[2013-02-28 02:42 UTC] laruence@php.net
-Status: Open
+Status: Analyzed
[2016-02-17 12:42 UTC] php at maisqi dot com
[2021-09-01 12:31 UTC] cmb@php.net
-Type: Bug
+Type: Documentation Problem
[2021-09-01 12:31 UTC] cmb@php.net
[2024-06-22 07:12 UTC] Steven268Danner at outlook dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 12:00:02 2025 UTC |
Description: ------------ If you set an error handler when inside an error handling function, set_error_handler will always return NULL. Test script: --------------- <pre> <?php function first_handler () { echo " first_handler\n"; echo ' Set to second handler: <strong>', gettype (set_error_handler ('second_handler')), "</strong>\n"; echo "\n\n", '$y = $o', "\n"; $y = $o; } function second_handler () { echo " second_handler\n"; } set_error_handler ('first_handler'); echo '$x = $y', "\n"; $x = $y; echo ' Set to other handler: <strong>', gettype (set_error_handler (function(){})), "</strong>\n"; Expected result: ---------------- set_error_handler should return the name of the error handling function, which in this case would be the name of the running function. Actual result: -------------- It just returns null.