summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_execute_API.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 731abce2f6..2de3928f17 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -1006,7 +1006,7 @@ ZEND_API int zend_u_lookup_class(zend_uchar type, void *name, int name_length, z
return FAILURE;
}
- ZVAL_STRINGL(&autoload_function, ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME)-1, 0);
+ ZVAL_STRINGL(&autoload_function, ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME)-1, 0);
ALLOC_ZVAL(class_name_ptr);
INIT_PZVAL(class_name_ptr);
@@ -1038,6 +1038,10 @@ ZEND_API int zend_u_lookup_class(zend_uchar type, void *name, int name_length, z
retval = zend_call_function(&fcall_info, &fcall_cache TSRMLS_CC);
EG(autoload_func) = fcall_cache.function_handler;
+ if (UG(unicode)) {
+ zval_dtor(&autoload_function);
+ }
+
zval_ptr_dtor(&class_name_ptr);
zend_u_hash_del(EG(in_autoload), type, lc_name, lc_name_len+1);