Fix indirect readonly error messages (#14979)

$obj->ro[] = 42;, passByRef($obj->ro); and the likes should emit an indirect
modification error message. This message already existed but was used
inconsistently.
This commit is contained in:
Ilija Tovilo 2024-07-16 23:24:07 +02:00 committed by GitHub
parent 71c520c74f
commit fdbe910b3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 28 additions and 28 deletions

View file

@ -3367,7 +3367,7 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
} else if (Z_PROP_FLAG_P(ptr) & IS_PROP_REINITABLE) {
Z_PROP_FLAG_P(ptr) &= ~IS_PROP_REINITABLE;
} else {
zend_readonly_property_modification_error(prop_info);
zend_readonly_property_indirect_modification_error(prop_info);
ZVAL_ERROR(result);
}
return;