Skip to content

Commit 5070fbf

Browse files
committed
Some tidying-up related to property existence checks
1 parent 1f14d58 commit 5070fbf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Zend/zend_builtin_functions.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1017,8 +1017,8 @@ static void _property_exists(zval *return_value, zval *object, zend_string *prop
10171017
RETURN_TRUE;
10181018
}
10191019

1020-
if (Z_TYPE_P(object) == IS_OBJECT &&
1021-
Z_OBJ_HANDLER_P(object, has_property)(Z_OBJ_P(object), property, 2, NULL)) {
1020+
if (Z_TYPE_P(object) == IS_OBJECT &&
1021+
Z_OBJ_HANDLER_P(object, has_property)(Z_OBJ_P(object), property, ZEND_PROPERTY_EXISTS, NULL)) {
10221022
RETURN_TRUE;
10231023
}
10241024
RETURN_FALSE;

ext/reflection/php_reflection.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4652,7 +4652,7 @@ ZEND_METHOD(ReflectionClass, hasProperty)
46524652
RETURN_TRUE;
46534653
} else {
46544654
if (Z_TYPE(intern->obj) != IS_UNDEF) {
4655-
if (Z_OBJ_HANDLER(intern->obj, has_property)(Z_OBJ(intern->obj), name, 2, NULL)) {
4655+
if (Z_OBJ_HANDLER(intern->obj, has_property)(Z_OBJ(intern->obj), name, ZEND_PROPERTY_EXISTS, NULL)) {
46564656
RETURN_TRUE;
46574657
}
46584658
}

0 commit comments

Comments
 (0)