From aff4957531f431f1e75d65007593e8f82e33afb4 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 27 Feb 2007 23:54:29 +0000 Subject: [PATCH] [1.4.x?] Alright, have both PHP5 and DOMDocument requirements for DOMLex checked. git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@766 48356398-32a2-884e-a903-53898d9a118a --- library/HTMLPurifier/Lexer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/HTMLPurifier/Lexer.php b/library/HTMLPurifier/Lexer.php index 7e028a2f..e7242e1e 100644 --- a/library/HTMLPurifier/Lexer.php +++ b/library/HTMLPurifier/Lexer.php @@ -151,7 +151,8 @@ class HTMLPurifier_Lexer $lexer = $prototype; } if (empty($lexer)) { - if (class_exists('DOMDocument')) { // check for DOM support + if (version_compare(PHP_VERSION, "5", ">=") && // check for PHP5 + class_exists('DOMDocument')) { // check for DOM support require_once 'HTMLPurifier/Lexer/DOMLex.php'; $lexer = new HTMLPurifier_Lexer_DOMLex(); } else {