Merge branch 'PHP-8.1'

* PHP-8.1:
  Disallow assigning reference to  unset readonly property
This commit is contained in:
Ilija Tovilo 2022-07-01 12:20:32 +02:00
commit 40908b10fc
No known key found for this signature in database
GPG key ID: A4F5D403F118200A
8 changed files with 248 additions and 13 deletions

View file

@ -853,6 +853,12 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_modification_error(
ZSTR_VAL(info->ce->name), zend_get_unmangled_property_name(info->name));
}
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_readonly_property_indirect_modification_error(zend_property_info *info)
{
zend_throw_error(NULL, "Cannot indirectly modify readonly property %s::$%s",
ZSTR_VAL(info->ce->name), zend_get_unmangled_property_name(info->name));
}
static zend_class_entry *resolve_single_class_type(zend_string *name, zend_class_entry *self_ce) {
if (zend_string_equals_literal_ci(name, "self")) {
return self_ce;