php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch set_error_handler-allow-null-parameter-corrected for Unknown/Other Function Bug #60738Patch version 2012-03-11 07:46 UTC Return to Bug #60738 | Download this patchThis patch is obsolete Obsoleted by patches: This patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: kevin.swinton@gmail.comIndex: Zend/zend_builtin_functions.c =================================================================== --- Zend/zend_builtin_functions.c (revision 324092) +++ Zend/zend_builtin_functions.c (working copy) @@ -1520,8 +1520,8 @@ return; } - if (!zend_is_callable(error_handler, 0, &error_handler_name TSRMLS_CC)) { - zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback", + if ( Z_TYPE_P(error_handler) != IS_NULL && !zend_is_callable(error_handler, 0, &error_handler_name TSRMLS_CC)) { + zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback or null", get_active_function_name(TSRMLS_C), error_handler_name?error_handler_name:"unknown"); efree(error_handler_name); return; |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Apr 18 11:01:28 2024 UTC |