From b45c6f5363f9115164e56e1f9e954668eeef45a3 Mon Sep 17 00:00:00 2001 From: Viktor Khokhryakov Date: Mon, 20 Mar 2017 10:42:28 +0400 Subject: [PATCH] Autoloading must be skipped while checking for php builtin class. --- library/HTMLPurifier/Lexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/HTMLPurifier/Lexer.php b/library/HTMLPurifier/Lexer.php index 99b3c7df..e9da3ed5 100644 --- a/library/HTMLPurifier/Lexer.php +++ b/library/HTMLPurifier/Lexer.php @@ -96,7 +96,7 @@ class HTMLPurifier_Lexer break; } - if (class_exists('DOMDocument') && + if (class_exists('DOMDocument', false) && method_exists('DOMDocument', 'loadHTML') && !extension_loaded('domxml') ) {