summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-12-13 16:38:42 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-12-13 16:38:42 +0100
commit72a5fdec2c40cb268701c8667bf5491b8a9ca7be (patch)
tree54f7a7e2fdb60b7f14e54e1068379412a46c0dd8 /Zend/zend_execute_API.c
parent9de4f87aca69b41aa0b26b5f426517b53ec87514 (diff)
parent7e9e0937f3a4557bf03ee5a3e7a546b266781eb4 (diff)
downloadphp-git-72a5fdec2c40cb268701c8667bf5491b8a9ca7be.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Fixed bug #78921
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 4551085675..de6af0e5d5 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -836,6 +836,7 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string *
zend_string *lc_name;
zend_fcall_info fcall_info;
zend_fcall_info_cache fcall_cache;
+ zend_class_entry *orig_fake_scope;
if (key) {
lc_name = key;
@@ -926,11 +927,14 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string *
fcall_cache.called_scope = NULL;
fcall_cache.object = NULL;
+ orig_fake_scope = EG(fake_scope);
+ EG(fake_scope) = NULL;
zend_exception_save();
if ((zend_call_function(&fcall_info, &fcall_cache) == SUCCESS) && !EG(exception)) {
ce = zend_hash_find_ptr(EG(class_table), lc_name);
}
zend_exception_restore();
+ EG(fake_scope) = orig_fake_scope;
zval_ptr_dtor(&args[0]);
zval_ptr_dtor_str(&fcall_info.function_name);