com php-src: Addtion fix for bug #68252 , forget static variable hanlding: Zend/zend_builtin_functions.c
| From: | Xinchen Hui | Date: | Tue, 28 Oct 2014 09:42:06 +0000 |
| Subject: | com php-src: Addtion fix for bug #68252 , forget static variable hanlding: Zend/zend_builtin_functions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82729@lists.php.net to get a copy of this message | ||
Commit: 5190d8fb56bb5086d634a8a4618ae054a767e31d
Author: Xinchen Hui <laruence@php.net> Tue, 28 Oct 2014 17:40:54 +0800
Parents: e6fe3127d0e02a58456fef1af969a8f114f85c31
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5190d8fb56bb5086d634a8a4618ae054a767e31d
Log:
Addtion fix for bug #68252 , forget static variable hanlding
Bugs:
https://bugs.php.net/68252
Changed paths:
M Zend/zend_builtin_functions.c
Diff:
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 940cdef...ddec6a7 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1830,7 +1830,10 @@ ZEND_FUNCTION(create_function)
RETURN_FALSE;
}
(*func->refcount)++;
+ static_variables = func->static_variables;
+ func->static_variables = NULL;
zend_hash_str_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME)-1);
+ func->static_variables = static_variables;
function_name = zend_string_alloc(sizeof("0lambda_")+MAX_LENGTH_OF_LONG, 0);
function_name->val[0] = '\0';
@@ -1838,9 +1841,6 @@ ZEND_FUNCTION(create_function)
do {
function_name->len = snprintf(function_name->val + 1,
sizeof("lambda_")+MAX_LENGTH_OF_LONG, "lambda_%d", ++EG(lambda_count)) + 1;
} while (zend_hash_add_ptr(EG(function_table), function_name, func) == NULL);
- static_variables = func->static_variables;
- func->static_variables = NULL;
- func->static_variables = static_variables;
RETURN_STR(function_name);
} else {
zend_hash_str_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME)-1);