]> 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]

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

diff --git a/NEWS b/NEWS
index 75df7ae16c2d12112eb274c3ab2a52363449c8c1..c1de96b6438d03f424d42a4fbfa8439f6f9be39e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,8 @@ PHP                                                                        NEWS
 - Fixed memory leak in extension loading when an error occurs on Windows.
   (Pierre)
 
+- Fixed bug #50152 (ReflectionClass::hasProperty hehaves like isset() not
+  property_exists). (Felipe)
 - Fixed bug #50073 (parse_url() incorrect when ? in fragment). (Ilia)
 - Fixed bug #50023 (pdo_mysql doesn't use PHP_MYSQL_UNIX_SOCK_ADDR). (Ilia)
 - Fixed bug #49908 (throwing exception in __autoload crashes when interface
index 9589307f041fea6bdc0924d31b6d8618764c3962..1a2f2a4bbc49fe4be541ce85e39250c13d82edd4 100644 (file)
@@ -3533,7 +3533,7 @@ ZEND_METHOD(reflection_class, hasProperty)
                if (intern->obj && Z_OBJ_HANDLER_P(intern->obj, has_property)) {
                        MAKE_STD_ZVAL(property);
                        ZVAL_STRINGL(property, name, 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 04cc6a11554910921782993bdb5940e3ecfaac93..c5b0ae5c2ac30378acdde9201a8a46befd5c812a 100755 (executable)
@@ -24,5 +24,4 @@ var_dump($obj->hasProperty("p4"));
 bool(true)
 bool(true)
 bool(true)
-string(2) "p4"
 bool(false)