php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #55705
Patch bug55705.phpt revision 2011-09-16 08:59 UTC by laruence@php.net
revision 2011-09-16 08:45 UTC by laruence@php.net
Patch bug55705.diff revision 2011-09-16 08:42 UTC by laruence@php.net

Patch bug55705.diff for Reproducible crash Bug #55705

Patch version 2011-09-16 08:42 UTC

Return to Bug #55705 | Download this patch
Patch Revisions:

Developer: laruence@php.net

Index: trunk/Zend/zend_execute.c
===================================================================
--- trunk/Zend/zend_execute.c	(revision 316845)
+++ trunk/Zend/zend_execute.c	(working copy)
@@ -639,6 +639,9 @@
 				break;
 
 			case IS_CALLABLE:
+				if (!arg) {
+					return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be of the type callback", "", "none", "" TSRMLS_CC);
+				}
 				if (!zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL TSRMLS_CC) && (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null)) {
 					return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be callable", "", zend_zval_type_name(arg), "" TSRMLS_CC);
 				}
Index: branches/PHP_5_4/Zend/zend_execute.c
===================================================================
--- branches/PHP_5_4/Zend/zend_execute.c	(revision 316845)
+++ branches/PHP_5_4/Zend/zend_execute.c	(working copy)
@@ -639,6 +639,9 @@
 				break;
 
 			case IS_CALLABLE:
+				if (!arg) {
+					return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be of the type callback", "", "none", "" TSRMLS_CC);
+				}
 				if (!zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL TSRMLS_CC) && (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null)) {
 					return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be callable", "", zend_zval_type_name(arg), "" TSRMLS_CC);
 				}
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC