Skip to content

Commit a356d1c

Browse files
authored
Update OOM error for DOMImplementation::createDocumentType (#14329)
Most of these kinds of error handling were already changed previously, but this one was apparently missed.
1 parent ab80392 commit a356d1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/dom/domimplementation.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ PHP_METHOD(DOMImplementation, createDocumentType)
100100
xmlFree(localname);
101101

102102
if (doctype == NULL) {
103-
php_error_docref(NULL, E_WARNING, "Unable to create DocumentType");
104-
RETURN_FALSE;
103+
php_dom_throw_error(INVALID_STATE_ERR, /* strict */ true);
104+
RETURN_THROWS();
105105
}
106106

107107
DOM_RET_OBJ((xmlNodePtr) doctype, NULL);

0 commit comments

Comments
 (0)