Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Zend/zend_object_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,8 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *zobj, zend_string *nam
uintptr_t property_offset;
const zend_property_info *prop_info = NULL;

ZEND_ASSERT(type != BP_VAR_R && type != BP_VAR_IS);

#if DEBUG_OBJECT_HANDLERS
fprintf(stderr, "Ptr object #%d property: %s\n", zobj->handle, ZSTR_VAL(name));
#endif
Expand All @@ -1412,7 +1414,7 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *zobj, zend_string *nam

return zend_std_get_property_ptr_ptr(zobj, name, type, cache_slot);
}
if (UNEXPECTED(type == BP_VAR_RW || type == BP_VAR_R)) {
if (UNEXPECTED(type == BP_VAR_RW)) {
if (prop_info) {
zend_typed_property_uninitialized_access(prop_info, name);
retval = &EG(error_zval);
Expand Down Expand Up @@ -1473,7 +1475,7 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *zobj, zend_string *nam
if (UNEXPECTED(!zobj->properties)) {
rebuild_object_properties_internal(zobj);
}
if (UNEXPECTED(type == BP_VAR_RW || type == BP_VAR_R)) {
if (UNEXPECTED(type == BP_VAR_RW)) {
zend_error(E_WARNING, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name));
}
retval = zend_hash_add(zobj->properties, name, &EG(uninitialized_zval));
Expand Down
Loading