felipe                                   Wed, 11 Nov 2009 18:52:12 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=290515

Log:
- Fixed bug #50152 (ReflectionClass::hasProperty hehaves like isset() not 
property_exists)
  [5_2 is OK]

Bug: http://bugs.php.net/50152 (Assigned) ReflectionClass::hasProperty hehaves 
like isset() not property_exists
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c
    U   php/php-src/branches/PHP_5_3/ext/reflection/tests/020.phpt
    U   php/php-src/trunk/ext/reflection/php_reflection.c
    U   php/php-src/trunk/ext/reflection/tests/020.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2009-11-11 18:10:51 UTC (rev 290514)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-11-11 18:52:12 UTC (rev 290515)
@@ -20,6 +20,8 @@
 - 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

Modified: php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c        
2009-11-11 18:10:51 UTC (rev 290514)
+++ php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c        
2009-11-11 18:52:12 UTC (rev 290515)
@@ -3533,7 +3533,7 @@
                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;
                        }

Modified: php/php-src/branches/PHP_5_3/ext/reflection/tests/020.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/reflection/tests/020.phpt  2009-11-11 
18:10:51 UTC (rev 290514)
+++ php/php-src/branches/PHP_5_3/ext/reflection/tests/020.phpt  2009-11-11 
18:52:12 UTC (rev 290515)
@@ -24,5 +24,4 @@
 bool(true)
 bool(true)
 bool(true)
-string(2) "p4"
 bool(false)

Modified: php/php-src/trunk/ext/reflection/php_reflection.c
===================================================================
--- php/php-src/trunk/ext/reflection/php_reflection.c   2009-11-11 18:10:51 UTC 
(rev 290514)
+++ php/php-src/trunk/ext/reflection/php_reflection.c   2009-11-11 18:52:12 UTC 
(rev 290515)
@@ -3700,7 +3700,7 @@
                        } 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;
                        }

Modified: php/php-src/trunk/ext/reflection/tests/020.phpt
===================================================================
--- php/php-src/trunk/ext/reflection/tests/020.phpt     2009-11-11 18:10:51 UTC 
(rev 290514)
+++ php/php-src/trunk/ext/reflection/tests/020.phpt     2009-11-11 18:52:12 UTC 
(rev 290515)
@@ -24,5 +24,4 @@
 bool(true)
 bool(true)
 bool(true)
-unicode(2) "p4"
 bool(false)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to