From ebe148391f27dba50fcf5665df94d930c51ed152 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 26 May 2024 13:01:33 +0200 Subject: [PATCH] Update OOM error for DOMImplementation::createDocumentType Most of these kinds of error handling were already changed previously, but this one was apparently missed. --- ext/dom/domimplementation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c index 08acb06492b60..b1778f8f8fd3b 100644 --- a/ext/dom/domimplementation.c +++ b/ext/dom/domimplementation.c @@ -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);