- Fixed bug #50152 (ReflectionClass::hasProperty hehaves like isset() not property_exists)

[5_2 is OK]
This commit is contained in:
Felipe Pena 2009-11-11 18:52:12 +00:00
parent 34bd384898
commit eea23b2794
3 changed files with 3 additions and 2 deletions

2
NEWS
View file

@ -20,6 +20,8 @@ PHP NEWS
- Fixed memory leak in extension loading when an error occurs on Windows. - Fixed memory leak in extension loading when an error occurs on Windows.
(Pierre) (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 #50073 (parse_url() incorrect when ? in fragment). (Ilia)
- Fixed bug #50023 (pdo_mysql doesn't use PHP_MYSQL_UNIX_SOCK_ADDR). (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 - Fixed bug #49908 (throwing exception in __autoload crashes when interface

View file

@ -3533,7 +3533,7 @@ ZEND_METHOD(reflection_class, hasProperty)
if (intern->obj && Z_OBJ_HANDLER_P(intern->obj, has_property)) { if (intern->obj && Z_OBJ_HANDLER_P(intern->obj, has_property)) {
MAKE_STD_ZVAL(property); MAKE_STD_ZVAL(property);
ZVAL_STRINGL(property, name, name_len, 1); 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); zval_ptr_dtor(&property);
RETURN_TRUE; RETURN_TRUE;
} }

View file

@ -24,5 +24,4 @@ var_dump($obj->hasProperty("p4"));
bool(true) bool(true)
bool(true) bool(true)
bool(true) bool(true)
string(2) "p4"
bool(false) bool(false)