mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Some tidying-up related to property existence checks
This commit is contained in:
@@ -1017,8 +1017,8 @@ static void _property_exists(zval *return_value, zval *object, zend_string *prop
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
if (Z_TYPE_P(object) == IS_OBJECT &&
|
||||
Z_OBJ_HANDLER_P(object, has_property)(Z_OBJ_P(object), property, 2, NULL)) {
|
||||
if (Z_TYPE_P(object) == IS_OBJECT &&
|
||||
Z_OBJ_HANDLER_P(object, has_property)(Z_OBJ_P(object), property, ZEND_PROPERTY_EXISTS, NULL)) {
|
||||
RETURN_TRUE;
|
||||
}
|
||||
RETURN_FALSE;
|
||||
|
||||
@@ -4652,7 +4652,7 @@ ZEND_METHOD(ReflectionClass, hasProperty)
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
if (Z_TYPE(intern->obj) != IS_UNDEF) {
|
||||
if (Z_OBJ_HANDLER(intern->obj, has_property)(Z_OBJ(intern->obj), name, 2, NULL)) {
|
||||
if (Z_OBJ_HANDLER(intern->obj, has_property)(Z_OBJ(intern->obj), name, ZEND_PROPERTY_EXISTS, NULL)) {
|
||||
RETURN_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user