diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2013-10-31 08:57:12 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2013-10-31 08:57:12 +0100 |
commit | 2361745806553db9099542d9237ade00dcee799b (patch) | |
tree | 8db4023bf325be29ba4f386cb6d1aac4f7911c9a /Zend/zend_builtin_functions.c | |
parent | 4218e89f8df4ca3897e3aad595e0c2c9cf4c3aca (diff) | |
download | php-git-2361745806553db9099542d9237ade00dcee799b.tar.gz |
Working commit for constant scalar expressions (with constants).
Tests will follow.
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r-- | Zend/zend_builtin_functions.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 55e5f34e83..b3b7529d9b 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -946,8 +946,11 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value /* 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_TYPE_MASK) == IS_CONSTANT) { - zval_update_constant(&prop_copy, 0 TSRMLS_CC); + switch (Z_TYPE_P(prop_copy) & IS_CONSTANT_TYPE_MASK) { + case IS_CONSTANT: + case IS_CONSTANT_ARRAY: + case IS_CONSTANT_AST: + zval_update_constant(&prop_copy, 0 TSRMLS_CC); } add_assoc_zval(return_value, key, prop_copy); |