|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesbug60738.patch (last revision 2012-03-24 04:17 UTC by laruence@php.net)error_handler_patch_1.diff (last revision 2012-03-23 20:50 UTC by nikic@php.net) set_error_handler-allow-null-parameter-corrected (last revision 2012-03-11 07:46 UTC by kevin dot swinton at gmail dot com) set_error_handler-allow-null-parameter (last revision 2012-03-10 22:34 UTC by kevin dot swinton at gmail dot com) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-03-13 08:56 UTC] kevin dot swinton at gmail dot com
[2012-03-23 20:50 UTC] nikic@php.net
[2012-03-24 03:24 UTC] laruence@php.net
[2012-03-24 03:26 UTC] laruence@php.net
[2012-03-24 03:30 UTC] laruence@php.net
[2012-03-24 03:32 UTC] laruence@php.net
[2012-03-24 04:17 UTC] laruence@php.net
[2012-03-24 06:37 UTC] laruence@php.net
-Assigned To:
+Assigned To: laruence
[2012-03-24 07:21 UTC] laruence@php.net
[2012-03-24 07:21 UTC] laruence@php.net
-Status: Assigned
+Status: Closed
[2012-03-24 08:52 UTC] stas@php.net
[2012-03-24 08:52 UTC] stas@php.net
-Status: Closed
+Status: Re-Opened
[2012-03-24 10:00 UTC] laruence@php.net
-Status: Re-Opened
+Status: Closed
[2012-03-24 10:00 UTC] laruence@php.net
[2012-03-24 11:44 UTC] laruence@php.net
[2012-03-24 11:44 UTC] laruence@php.net
-Status: Closed
+Status: Re-Opened
[2012-09-28 04:09 UTC] laruence@php.net
[2012-09-28 04:09 UTC] laruence@php.net
-Status: Re-Opened
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 18:00:01 2025 UTC |
Description: ------------ Can the 'set_error_handler' function be made to accept NULL as the parameter in such a way as to reset this feature to the default state of -no- handler being set? This would duplicate the behavior of the 'set_exception_handler' function. Note: this change should not interfere with the 'restore_error_handler' function. And as for the 'set_exception_handler' function - if NULL is given as a parameter, can the return value of 'set_exception_handler' be set to the details of the previously set exception handler function (string or array) instead of always '(bool) true' as it now does? Test script: --------------- function testhandler1($errno= null, $errstr= null, $errfile= null, $errline = null) { error_log('1: ' . print_r(func_get_args(), true)); die(); } function testhandler2($errno= null, $errstr= null, $errfile= null, $errline = null) { error_log('2: ' . print_r(func_get_args(), true)); die(); } var_dump(set_error_handler('testhandler1')); var_dump(set_error_handler('testhandler2')); var_dump(set_error_handler(null)); Expected result: ---------------- NULL string(12) "testhandler1" string(12) "testhandler2" Actual result: -------------- On line 'var_dump(set_error_handler(null));', a 'set_error_handler() expects the argument () to be a valid callback' error is generated and handled by function "testhandler2"