mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Update error handling when node cannot be added (#13421)
This can only fail on OOM, so be consistent with the other locations and throw an INVALID_STATE_ERR.
This commit is contained in:
@@ -1285,8 +1285,7 @@ PHP_METHOD(DOMNode, appendChild)
|
||||
DOM_RET_OBJ(new_child, &ret, intern);
|
||||
return;
|
||||
cannot_add:
|
||||
// TODO Convert to Error?
|
||||
php_error_docref(NULL, E_WARNING, "Couldn't append node");
|
||||
php_dom_throw_error(INVALID_STATE_ERR, stricterror);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
/* }}} end dom_node_append_child */
|
||||
|
||||
Reference in New Issue
Block a user