]> granicus.if.org Git - php/commitdiff
- MFH Bugfix #30856
authorMarcus Boerger <helly@php.net>
Wed, 24 Nov 2004 19:59:28 +0000 (19:59 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 24 Nov 2004 19:59:28 +0000 (19:59 +0000)
Zend/zend_reflection_api.c
ext/reflection/php_reflection.c

index 3b2d2829632e2059664d655b6116b9a8be7457a2..6df08266a87216f18bae26bc3213327d711e8b1e 100644 (file)
@@ -2127,6 +2127,13 @@ ZEND_METHOD(reflection_class, getStaticProperties)
        
        METHOD_NOTSTATIC_NUMPARAMS(0);  
        GET_REFLECTION_OBJECT_PTR(ce);
+
+       if (!ce->constants_updated) {
+               zend_hash_apply_with_argument(&ce->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
+               zend_hash_apply_with_argument(ce->static_members, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
+               ce->constants_updated = 1;
+       }
+
        array_init(return_value);
        zend_hash_copy(Z_ARRVAL_P(return_value), ce->static_members, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
 }
index 3b2d2829632e2059664d655b6116b9a8be7457a2..6df08266a87216f18bae26bc3213327d711e8b1e 100644 (file)
@@ -2127,6 +2127,13 @@ ZEND_METHOD(reflection_class, getStaticProperties)
        
        METHOD_NOTSTATIC_NUMPARAMS(0);  
        GET_REFLECTION_OBJECT_PTR(ce);
+
+       if (!ce->constants_updated) {
+               zend_hash_apply_with_argument(&ce->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
+               zend_hash_apply_with_argument(ce->static_members, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
+               ce->constants_updated = 1;
+       }
+
        array_init(return_value);
        zend_hash_copy(Z_ARRVAL_P(return_value), ce->static_members, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
 }