From: Xinchen Hui Date: Sat, 21 Feb 2015 14:44:51 +0000 (+0800) Subject: Only do this in debug build X-Git-Tag: PRE_PHP7_EREG_MYSQL_REMOVALS~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f25419f8e362faf96005ae6f78a7f901dfbcb971;p=php Only do this in debug build --- diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 3943b7105a..37f8d55bd3 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -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 } /* }}} */ diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index eba9cea43c..6c0e2f3533 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -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 } /* }}} */