From f23d44f8e592f36fd3f55a2365fd28bb3ae41b00 Mon Sep 17 00:00:00 2001 From: Michael Kliewe Date: Fri, 18 Nov 2022 22:44:20 +0100 Subject: [PATCH] Removed unused variable Fixes: 1766 Class DOMDocumentType does not have a constructor and must be instantiated without any parameters. --- library/HTMLPurifier/Lexer/PH5P.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/library/HTMLPurifier/Lexer/PH5P.php b/library/HTMLPurifier/Lexer/PH5P.php index 1564f283d..04ad36617 100644 --- a/library/HTMLPurifier/Lexer/PH5P.php +++ b/library/HTMLPurifier/Lexer/PH5P.php @@ -1759,12 +1759,6 @@ private function initPhase($token) /* A DOCTYPE token marked as being correct */ } elseif (isset($token['error']) && !$token['error']) { - /* Append a DocumentType node to the Document node, with the name - attribute set to the name given in the DOCTYPE token (which will be - "HTML"), and the other attributes specific to DocumentType objects - set to null, empty lists, or the empty string as appropriate. */ - $doctype = new DOMDocumentType(null, null, 'HTML'); - /* Then, switch to the root element phase of the tree construction stage. */ $this->phase = self::ROOT_PHASE;