mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.1'
* PHP-8.1: Disallow assigning reference to unset readonly property
This commit is contained in:
commit
40908b10fc
8 changed files with 248 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue