]> granicus.if.org Git - php/commitdiff
- Fixed bug #50152 (ReflectionClass::hasProperty hehaves like isset() not property_ex...
authorFelipe Pena <felipe@php.net>
Wed, 11 Nov 2009 18:52:12 +0000 (18:52 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 11 Nov 2009 18:52:12 +0000 (18:52 +0000)
  [5_2 is OK]

ext/reflection/php_reflection.c
ext/reflection/tests/020.phpt

index 5043d811073e3ec27999cd3350cb44dd11f9f8fc..61b146b3e0d2f093112cb096c91e734b21d6fcdc 100644 (file)
@@ -3700,7 +3700,7 @@ ZEND_METHOD(reflection_class, hasProperty)
                        } else {
                                ZVAL_UNICODEL(property, name.u, name_len, 1);
                        }
-                       if (Z_OBJ_HANDLER_P(intern->obj, has_property)(intern->obj, property, 0 TSRMLS_CC)) {
+                       if (Z_OBJ_HANDLER_P(intern->obj, has_property)(intern->obj, property, 2 TSRMLS_CC)) {
                                zval_ptr_dtor(&property);
                                RETURN_TRUE;
                        }
index 4440cd18f79c36212c6650917028c080d80db055..c5b0ae5c2ac30378acdde9201a8a46befd5c812a 100755 (executable)
@@ -24,5 +24,4 @@ var_dump($obj->hasProperty("p4"));
 bool(true)
 bool(true)
 bool(true)
-unicode(2) "p4"
 bool(false)