diff options
Diffstat (limited to 'Zend/zend_closures.c')
-rw-r--r-- | Zend/zend_closures.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index ee7b38224e..5aee27b02f 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -198,7 +198,8 @@ ZEND_METHOD(Closure, bind) } else if (Z_TYPE_P(scope_arg) == IS_NULL) { ce = NULL; } else { - zend_string *class_name = zval_get_string(scope_arg); + zend_string *tmp_class_name; + zend_string *class_name = zval_get_tmp_string(scope_arg, &tmp_class_name); if (zend_string_equals_literal(class_name, "static")) { ce = closure->func.common.scope; } else if ((ce = zend_lookup_class_ex(class_name, NULL, 1)) == NULL) { @@ -206,7 +207,7 @@ ZEND_METHOD(Closure, bind) zend_string_release(class_name); RETURN_NULL(); } - zend_string_release(class_name); + zend_tmp_string_release(tmp_class_name); } } else { /* scope argument not given; do not change the scope by default */ ce = closure->func.common.scope; |