summaryrefslogtreecommitdiff
path: root/Zend/zend_builtin_functions.c
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2014-11-25 08:37:02 +0000
committerkrakjoe <joe.watkins@live.co.uk>2014-11-25 08:37:02 +0000
commite07feeaf8b91f16a89e9903b461042a0f6a63ac0 (patch)
tree4a94cd382fcffefff920f7733562e1860a66cc44 /Zend/zend_builtin_functions.c
parent9b6836ebd36eccc9e81ca51e2efe172e1d334f0b (diff)
parentd4f42289ddde002cb4d3ed9d1a4f2219f68df48e (diff)
downloadphp-git-e07feeaf8b91f16a89e9903b461042a0f6a63ac0.tar.gz
Merge branch 'master' of https://github.com/php/php-src
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r--Zend/zend_builtin_functions.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index ddec6a7ddb..ecb8f4e0d1 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -954,12 +954,10 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
continue;
}
prop = NULL;
- if (prop_info->offset >= 0) {
- if (statics && (prop_info->flags & ZEND_ACC_STATIC) != 0) {
- prop = &ce->default_static_members_table[prop_info->offset];
- } else if (!statics && (prop_info->flags & ZEND_ACC_STATIC) == 0) {
- prop = &ce->default_properties_table[prop_info->offset];
- }
+ if (statics && (prop_info->flags & ZEND_ACC_STATIC) != 0) {
+ prop = &ce->default_static_members_table[prop_info->offset];
+ } else if (!statics && (prop_info->flags & ZEND_ACC_STATIC) == 0) {
+ prop = &ce->default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)];
}
if (!prop || Z_TYPE_P(prop) == IS_UNDEF) {
continue;