From: Andrei Zmievski Date: Mon, 27 Nov 2000 17:00:54 +0000 (+0000) Subject: Update class constants before trying to get default properties. X-Git-Tag: php-4.0.4RC3~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81814c8ddc683de6e00627bebfa0c457e5530e8f;p=php Update class constants before trying to get default properties. --- diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index d932bf0c39..e693fab1e0 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -531,6 +531,10 @@ ZEND_FUNCTION(get_class_vars) } else { efree(lcname); array_init(return_value); + if (!ce->constants_updated) { + zend_hash_apply_with_argument(&ce->default_properties, (int (*)(void *,void *)) zval_update_constant, (void *) 1); + ce->constants_updated = 1; + } zend_hash_copy(return_value->value.ht, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); } }