Skip to content

Commit d775fe3

Browse files
committed
Better name: ZEND_PROPERTY_HAS => ZEND_PROPERTY_NOT_EMPTY
1 parent 1638a6e commit d775fe3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Zend/zend_object_handlers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ ZEND_API int zend_std_has_property(zval *object, zval *member, int has_set_exist
16641664
case ZEND_PROPERTY_EXISTS:
16651665
result = 1;
16661666
break;
1667-
case ZEND_PROPERTY_HAS:
1667+
case ZEND_PROPERTY_NOT_EMPTY:
16681668
default:
16691669
result = zend_is_true(value);
16701670
break;
@@ -1695,7 +1695,7 @@ ZEND_API int zend_std_has_property(zval *object, zval *member, int has_set_exist
16951695
if (Z_TYPE(rv) != IS_UNDEF) {
16961696
result = zend_is_true(&rv);
16971697
zval_ptr_dtor(&rv);
1698-
if (has_set_exists == ZEND_PROPERTY_HAS && result) {
1698+
if (has_set_exists == ZEND_PROPERTY_NOT_EMPTY && result) {
16991699
if (EXPECTED(!EG(exception)) && zobj->ce->__get && !((*guard) & IN_GET)) {
17001700
(*guard) |= IN_GET;
17011701
zend_std_call_getter(zobj, member, &rv);

Zend/zend_object_handlers.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ extern const ZEND_API zend_object_handlers std_object_handlers;
173173
#define zend_get_function_root_class(fbc) \
174174
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope)
175175

176-
#define ZEND_PROPERTY_ISSET 0x0 /* Property is exists and not NULL */
177-
#define ZEND_PROPERTY_HAS 0x1 /* Property is exists and is TRUE */
178-
#define ZEND_PROPERTY_EXISTS 0x2 /* Property is exists */
176+
#define ZEND_PROPERTY_ISSET 0x0 /* Property exists and is not NULL */
177+
#define ZEND_PROPERTY_NOT_EMPTY ZEND_ISEMPTY /* Property is not empty */
178+
#define ZEND_PROPERTY_EXISTS 0x2 /* Property exists */
179179

180180
ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
181181
ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent);

ext/mysqli/mysqli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static int mysqli_object_has_property(zval *object, zval *member, int has_set_ex
385385
case ZEND_PROPERTY_EXISTS:
386386
ret = 1;
387387
break;
388-
case ZEND_PROPERTY_HAS: {
388+
case ZEND_PROPERTY_NOT_EMPTY: {
389389
zval rv;
390390
zval *value = mysqli_read_property(object, member, BP_VAR_IS, cache_slot, &rv);
391391
if (value != &EG(uninitialized_zval)) {

0 commit comments

Comments
 (0)