Skip to content

Commit

Permalink
Remove unnecessary disablement of autoload (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman authored Feb 6, 2023
1 parent 0176ef4 commit b4136da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/HTMLPurifier/DefinitionCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function create($type, $config)
return $this->caches[$method][$type];
}
if (isset($this->implementations[$method]) &&
class_exists($class = $this->implementations[$method], false)) {
class_exists($class = $this->implementations[$method])) {
$cache = new $class($type);
} else {
if ($method != 'Serializer') {
Expand Down
2 changes: 1 addition & 1 deletion library/HTMLPurifier/LanguageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function create($config, $context, $code = false)
} else {
$class = 'HTMLPurifier_Language_' . $pcode;
$file = $this->dir . '/Language/classes/' . $code . '.php';
if (file_exists($file) || class_exists($class, false)) {
if (file_exists($file) || class_exists($class)) {
$lang = new $class($config, $context);
} else {
// Go fallback
Expand Down
2 changes: 1 addition & 1 deletion library/HTMLPurifier/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static function create($config)
break;
}

if (class_exists('DOMDocument', false) &&
if (class_exists('DOMDocument') &&
method_exists('DOMDocument', 'loadHTML') &&
!extension_loaded('domxml')
) {
Expand Down

0 comments on commit b4136da

Please sign in to comment.