summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 3d94fd5986..bc67c6a1b6 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -4082,6 +4082,12 @@ ZEND_API int zend_update_static_property_ex(zend_class_entry *scope, zend_string
zval *property;
zend_class_entry *old_scope = EG(fake_scope);
+ if (UNEXPECTED(!(scope->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) {
+ if (UNEXPECTED(zend_update_class_constants(scope)) != SUCCESS) {
+ return FAILURE;
+ }
+ }
+
EG(fake_scope) = scope;
property = zend_std_get_static_property(scope, name, 0);
EG(fake_scope) = old_scope;