0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 16:31:53 +00:00

Mute STRICT errors from CSSTidy and don't run PEARSax3 on PHP 5.3.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Edward Z. Yang 2010-04-26 18:27:32 -04:00
parent da94d3d6ac
commit c1cbd9e565
2 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,10 @@ class HTMLPurifier_LexerTest extends HTMLPurifier_Harness
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
if ($GLOBALS['HTMLPurifierTest']['PEAR']) { if ($GLOBALS['HTMLPurifierTest']['PEAR'] &&
// PEARSax3 is not maintained and throws loads of DEPRECATED
// errors in PHP 5.3
version_compare(PHP_VERSION, '5.3', '<')) {
require_once 'HTMLPurifier/Lexer/PEARSax3.php'; require_once 'HTMLPurifier/Lexer/PEARSax3.php';
$this->_has_pear = true; $this->_has_pear = true;
} }

View File

@ -48,7 +48,9 @@ require_once $simpletest_location . 'remote.php';
// load CSS Tidy // load CSS Tidy
if ($csstidy_location !== false) { if ($csstidy_location !== false) {
$old = error_reporting(E_ALL);
require $csstidy_location . 'class.csstidy.php'; require $csstidy_location . 'class.csstidy.php';
error_reporting($old);
} }
// load PEAR to include path // load PEAR to include path