summaryrefslogtreecommitdiff
path: root/Zend/zend_builtin_functions.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-05-21 04:13:10 +0300
committerDmitry Stogov <dmitry@zend.com>2015-05-21 04:13:10 +0300
commitca64b41b9900f39a41732fd825a53e87d2f5ea66 (patch)
treee2295559ada57529071174d538f4e774ee87a1f8 /Zend/zend_builtin_functions.c
parent0c50f49710a58834287667aab28feba766bd5cd8 (diff)
downloadphp-git-ca64b41b9900f39a41732fd825a53e87d2f5ea66.tar.gz
Fixed zend_update_class_constants() to always resolve all constants.
Call zend_update_class_constants() only when necessary.
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r--Zend/zend_builtin_functions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 7313b32065..6b65bdd330 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1105,8 +1105,10 @@ ZEND_FUNCTION(get_class_vars)
RETURN_FALSE;
} else {
array_init(return_value);
- if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) {
- return;
+ if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) {
+ if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) {
+ return;
+ }
}
add_class_vars(ce, 0, return_value);
add_class_vars(ce, 1, return_value);