1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Update OOM error for DOMImplementation::createDocumentType (#14329)

Most of these kinds of error handling were already changed previously,
but this one was apparently missed.
This commit is contained in:
Niels Dossche
2024-05-26 17:31:27 +02:00
committed by GitHub
parent ab80392710
commit a356d1c0e9

View File

@@ -100,8 +100,8 @@ PHP_METHOD(DOMImplementation, createDocumentType)
xmlFree(localname);
if (doctype == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to create DocumentType");
RETURN_FALSE;
php_dom_throw_error(INVALID_STATE_ERR, /* strict */ true);
RETURN_THROWS();
}
DOM_RET_OBJ((xmlNodePtr) doctype, NULL);