1
0
mirror of https://github.com/php/php-src.git synced 2026-04-02 21:52:36 +02:00

- MFH Bug #29505 get_class_vars() severely broken when used with arrays

This commit is contained in:
Marcus Boerger
2004-08-03 17:02:35 +00:00
parent 2e98f2dd1a
commit 9158cd2494

View File

@@ -701,6 +701,12 @@ ZEND_FUNCTION(get_class_vars)
zval_copy_ctor(prop_copy);
INIT_PZVAL(prop_copy);
/* this is necessary to make it able to work with default array
* properties, returned to user */
if (Z_TYPE_P(prop_copy) == IS_CONSTANT_ARRAY || Z_TYPE_P(prop_copy) == IS_CONSTANT) {
zval_update_constant(&prop_copy, 0 TSRMLS_CC);
}
add_assoc_zval(return_value, prop_name, prop_copy);
}
}