]> granicus.if.org Git - php/commitdiff
Update class constants before trying to get default properties.
authorAndrei Zmievski <andrei@php.net>
Mon, 27 Nov 2000 17:00:54 +0000 (17:00 +0000)
committerAndrei Zmievski <andrei@php.net>
Mon, 27 Nov 2000 17:00:54 +0000 (17:00 +0000)
Zend/zend_builtin_functions.c

index d932bf0c39577df829afa090bc4ad3228e46d0d3..e693fab1e0639b14260327499048e9f05f21af01 100644 (file)
@@ -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 *));
        }
 }