Better name: ZEND_PROPERTY_HAS => ZEND_PROPERTY_NOT_EMPTY

This commit is contained in:
Dmitry Stogov 2018-07-24 09:31:57 +03:00
parent 1638a6e118
commit d775fe33d1
3 changed files with 6 additions and 6 deletions

View file

@ -1664,7 +1664,7 @@ found:
case ZEND_PROPERTY_EXISTS: case ZEND_PROPERTY_EXISTS:
result = 1; result = 1;
break; break;
case ZEND_PROPERTY_HAS: case ZEND_PROPERTY_NOT_EMPTY:
default: default:
result = zend_is_true(value); result = zend_is_true(value);
break; break;
@ -1695,7 +1695,7 @@ found:
if (Z_TYPE(rv) != IS_UNDEF) { if (Z_TYPE(rv) != IS_UNDEF) {
result = zend_is_true(&rv); result = zend_is_true(&rv);
zval_ptr_dtor(&rv); zval_ptr_dtor(&rv);
if (has_set_exists == ZEND_PROPERTY_HAS && result) { if (has_set_exists == ZEND_PROPERTY_NOT_EMPTY && result) {
if (EXPECTED(!EG(exception)) && zobj->ce->__get && !((*guard) & IN_GET)) { if (EXPECTED(!EG(exception)) && zobj->ce->__get && !((*guard) & IN_GET)) {
(*guard) |= IN_GET; (*guard) |= IN_GET;
zend_std_call_getter(zobj, member, &rv); zend_std_call_getter(zobj, member, &rv);

View file

@ -173,9 +173,9 @@ extern const ZEND_API zend_object_handlers std_object_handlers;
#define zend_get_function_root_class(fbc) \ #define zend_get_function_root_class(fbc) \
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope) ((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope)
#define ZEND_PROPERTY_ISSET 0x0 /* Property is exists and not NULL */ #define ZEND_PROPERTY_ISSET 0x0 /* Property exists and is not NULL */
#define ZEND_PROPERTY_HAS 0x1 /* Property is exists and is TRUE */ #define ZEND_PROPERTY_NOT_EMPTY ZEND_ISEMPTY /* Property is not empty */
#define ZEND_PROPERTY_EXISTS 0x2 /* Property is exists */ #define ZEND_PROPERTY_EXISTS 0x2 /* Property exists */
ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key); ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent); ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent);

View file

@ -385,7 +385,7 @@ static int mysqli_object_has_property(zval *object, zval *member, int has_set_ex
case ZEND_PROPERTY_EXISTS: case ZEND_PROPERTY_EXISTS:
ret = 1; ret = 1;
break; break;
case ZEND_PROPERTY_HAS: { case ZEND_PROPERTY_NOT_EMPTY: {
zval rv; zval rv;
zval *value = mysqli_read_property(object, member, BP_VAR_IS, cache_slot, &rv); zval *value = mysqli_read_property(object, member, BP_VAR_IS, cache_slot, &rv);
if (value != &EG(uninitialized_zval)) { if (value != &EG(uninitialized_zval)) {