Skip to content

Commit 7e46550

Browse files
committed
revert back
1 parent 8e29897 commit 7e46550

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

ext/dom/php_dom.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,12 @@ zval *dom_write_property(zend_object *object, zend_string *name, zval *value, vo
425425
}
426426

427427
if (UNEXPECTED(!hnd->write_func)) {
428-
ZEND_ASSERT(prop && (prop->flags & ZEND_ACC_PPP_SET_MASK));
429-
zend_asymmetric_visibility_property_modification_error(prop, "modify");
428+
if (prop && (prop->flags & ZEND_ACC_PPP_SET_MASK) &&
429+
!zend_asymmetric_property_has_set_access(prop)) {
430+
zend_asymmetric_visibility_property_modification_error(prop, "modify");
431+
} else {
432+
zend_readonly_property_modification_error_ex(ZSTR_VAL(object->ce->name), ZSTR_VAL(name));
433+
}
430434
return &EG(error_zval);
431435
}
432436

0 commit comments

Comments
 (0)