From: Felipe Pena Date: Wed, 11 Nov 2009 18:52:12 +0000 (+0000) Subject: - Fixed bug #50152 (ReflectionClass::hasProperty hehaves like isset() not property_ex... X-Git-Tag: php-5.4.0alpha1~191^2~2410 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6770f10a046679b9545de43c691fcfce7e67f67;p=php - Fixed bug #50152 (ReflectionClass::hasProperty hehaves like isset() not property_exists) [5_2 is OK] --- diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 5043d81107..61b146b3e0 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -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; } diff --git a/ext/reflection/tests/020.phpt b/ext/reflection/tests/020.phpt index 4440cd18f7..c5b0ae5c2a 100755 --- a/ext/reflection/tests/020.phpt +++ b/ext/reflection/tests/020.phpt @@ -24,5 +24,4 @@ var_dump($obj->hasProperty("p4")); bool(true) bool(true) bool(true) -unicode(2) "p4" bool(false)