return (uint32_t)(intptr_t)CACHED_PTR_EX(cache_slot + 1);
}
- if (UNEXPECTED(ZSTR_VAL(member)[0] == '\0')) {
+ if (UNEXPECTED(ZSTR_VAL(member)[0] == '\0' && ZSTR_LEN(member) != 0)) {
if (!silent) {
- if (ZSTR_LEN(member) == 0) {
- zend_throw_error(NULL, "Cannot access empty property");
- } else {
- zend_throw_error(NULL, "Cannot access property started with '\\0'");
- }
+ zend_throw_error(NULL, "Cannot access property started with '\\0'");
}
return ZEND_WRONG_PROPERTY_OFFSET;
}
uint32_t flags;
zend_class_entry *scope;
- if (UNEXPECTED(ZSTR_VAL(member)[0] == '\0')) {
+ if (UNEXPECTED(ZSTR_VAL(member)[0] == '\0' && ZSTR_LEN(member) != 0)) {
if (!silent) {
- if (ZSTR_LEN(member) == 0) {
- zend_throw_error(NULL, "Cannot access empty property");
- } else {
- zend_throw_error(NULL, "Cannot access property started with '\\0'");
- }
+ zend_throw_error(NULL, "Cannot access property started with '\\0'");
}
return ZEND_WRONG_PROPERTY_INFO;
}
zval_ptr_dtor(&tmp_object);
goto exit;
} else {
- if (Z_STRVAL_P(member)[0] == '\0') {
- if (Z_STRLEN_P(member) == 0) {
- zend_throw_error(NULL, "Cannot access empty property");
- retval = &EG(uninitialized_zval);
- goto exit;
- } else {
- zend_throw_error(NULL, "Cannot access property started with '\\0'");
- retval = &EG(uninitialized_zval);
- goto exit;
- }
+ if (Z_STRVAL_P(member)[0] == '\0' && Z_STRLEN_P(member) != 0) {
+ zend_throw_error(NULL, "Cannot access property started with '\\0'");
+ retval = &EG(uninitialized_zval);
+ goto exit;
}
}
}
} else if (EXPECTED(property_offset != ZEND_WRONG_PROPERTY_OFFSET)) {
goto write_std_property;
} else {
- if (Z_STRVAL_P(member)[0] == '\0') {
- if (Z_STRLEN_P(member) == 0) {
- zend_throw_error(NULL, "Cannot access empty property");
- goto exit;
- } else {
- zend_throw_error(NULL, "Cannot access property started with '\\0'");
- goto exit;
- }
+ if (Z_STRVAL_P(member)[0] == '\0' && Z_STRLEN_P(member) != 0) {
+ zend_throw_error(NULL, "Cannot access property started with '\\0'");
+ goto exit;
}
}
} else if (EXPECTED(property_offset != ZEND_WRONG_PROPERTY_OFFSET)) {
(*guard) &= ~IN_UNSET;
zval_ptr_dtor(&tmp_object);
} else {
- if (Z_STRVAL_P(member)[0] == '\0') {
- if (Z_STRLEN_P(member) == 0) {
- zend_throw_error(NULL, "Cannot access empty property");
- goto exit;
- } else {
- zend_throw_error(NULL, "Cannot access property started with '\\0'");
- goto exit;
- }
+ if (Z_STRVAL_P(member)[0] == '\0' && Z_STRLEN_P(member) != 0) {
+ zend_throw_error(NULL, "Cannot access property started with '\\0'");
+ goto exit;
}
}
}