php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60738
Patch bug60738.patch revision 2012-03-24 04:17 UTC by laruence@php.net
revision 2012-03-24 03:32 UTC by laruence@php.net
revision 2012-03-24 03:30 UTC by laruence@php.net
revision 2012-03-24 03:24 UTC by laruence@php.net
Patch error_handler_patch_1.diff revision 2012-03-23 20:50 UTC by nikic@php.net
Patch set_error_handler-allow-null-parameter-corrected revision 2012-03-11 07:46 UTC by kevin dot swinton at gmail dot com
Patch set_error_handler-allow-null-parameter revision 2012-03-10 22:34 UTC by kevin dot swinton at gmail dot com

Patch set_error_handler-allow-null-parameter-corrected for Unknown/Other Function Bug #60738

Patch version 2012-03-11 07:46 UTC

Return to Bug #60738 | Download this patch
This patch is obsolete

Obsoleted by patches:

This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: kevin.swinton@gmail.com

Index: 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;
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 24 21:01:55 2014 UTC