diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-05-21 04:13:10 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-05-21 04:13:10 +0300 |
commit | ca64b41b9900f39a41732fd825a53e87d2f5ea66 (patch) | |
tree | e2295559ada57529071174d538f4e774ee87a1f8 /Zend/zend_builtin_functions.c | |
parent | 0c50f49710a58834287667aab28feba766bd5cd8 (diff) | |
download | php-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.c | 6 |
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); |