From bcd0802ea4a23971b5d53892c7de4e9e1822309f Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 8 Nov 2019 09:46:23 +0000 Subject: update composr libs (cherry picked from commit 2df15f35d706d4608ff723ce6288391ca774f7ba) --- vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer') diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php index b573426de..ca5f25b84 100644 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php +++ b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php @@ -74,7 +74,12 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer } set_error_handler(array($this, 'muteErrorHandler')); - $doc->loadHTML($html, $options); + // loadHTML() fails on PHP 5.3 when second parameter is given + if ($options) { + $doc->loadHTML($html, $options); + } else { + $doc->loadHTML($html); + } restore_error_handler(); $body = $doc->getElementsByTagName('html')->item(0)-> // -- cgit v1.2.3