]> granicus.if.org Git - php/commitdiff
Only do this in debug build
authorXinchen Hui <laruence@php.net>
Sat, 21 Feb 2015 14:44:51 +0000 (22:44 +0800)
committerXinchen Hui <laruence@php.net>
Sat, 21 Feb 2015 14:44:51 +0000 (22:44 +0800)
Zend/zend_closures.c
Zend/zend_object_handlers.c

index 3943b7105a262fcd584cecae4595c3527a5ce52b..37f8d55bd39337f7c130307b8acba50fb6288f75 100644 (file)
@@ -63,7 +63,9 @@ ZEND_METHOD(Closure, __invoke) /* {{{ */
        /* destruct the function also, then - we have allocated it in get_method */
        zend_string_release(func->internal_function.function_name);
        efree(func);
-       EX(func) = NULL;
+#if ZEND_DEBUG
+       execute_data->func = NULL;
+#endif
 }
 /* }}} */
 
index eba9cea43cd436b008774ae460d8a5cea37ec2c6..6c0e2f35334b0b5516180f986087407a6adc713a 100644 (file)
@@ -934,7 +934,9 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */
 
        /* destruct the function also, then - we have allocated it in get_method */
        efree_size(func, sizeof(zend_internal_function));
+#if ZEND_DEBUG
        execute_data->func = NULL;
+#endif
 }
 /* }}} */
 
@@ -1155,7 +1157,9 @@ ZEND_API void zend_std_callstatic_user_call(INTERNAL_FUNCTION_PARAMETERS) /* {{{
 
        /* destruct the function also, then - we have allocated it in get_method */
        efree_size(func, sizeof(zend_internal_function));
+#if ZEND_DEBUG
        execute_data->func = NULL;
+#endif
 }
 /* }}} */