summaryrefslogtreecommitdiff
path: root/ext/reflection
diff options
context:
space:
mode:
authorAndrea Faulds <ajf@ajf.me>2014-11-29 01:45:54 +0000
committerAndrea Faulds <ajf@ajf.me>2014-11-29 01:45:54 +0000
commit01554bf3e417f13baf7af874e449c265c0309279 (patch)
tree8aca46ab27a54cea34c14001af774942f0502e39 /ext/reflection
parent65c8edd525108f6598a8bb25fb3c5d6c80233322 (diff)
parent719083bd943e6c287c2dcb47918cf51f89a4ac08 (diff)
downloadphp-git-01554bf3e417f13baf7af874e449c265c0309279.tar.gz
Merge branch 'master' into zppFailOnOverflow
Diffstat (limited to 'ext/reflection')
-rw-r--r--ext/reflection/php_reflection.c10
-rw-r--r--ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt16
2 files changed, 6 insertions, 20 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index b972c2899c..e9c59ea86e 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -3359,12 +3359,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[OBJ_PROP_TO_NUM(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) {
continue;
diff --git a/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt b/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
index 4772f6548d..5655d19972 100644
--- a/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
+++ b/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
@@ -41,11 +41,11 @@ Name: arr1
Is passed by reference: yes
Can be passed by value: yes
-Name: SORT_ASC_or_SORT_DESC
+Name: sort_order
Is passed by reference: yes
Can be passed by value: yes
-Name: SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING
+Name: sort_flags
Is passed by reference: yes
Can be passed by value: yes
@@ -53,18 +53,6 @@ Name: arr2
Is passed by reference: yes
Can be passed by value: yes
-Name: SORT_ASC_or_SORT_DESC
-Is passed by reference: yes
-Can be passed by value: yes
-
-Name: SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING
-Is passed by reference: yes
-Can be passed by value: yes
-
-Name: more_array_and_sort_options
-Is passed by reference: yes
-Can be passed by value: yes
-
=> sort:
Name: arg