Skip to content

Commit

Permalink
Merge pull request #1 from robocoder/master
Browse files Browse the repository at this point in the history
Check HTMLPurifier class already loaded before direct inclusion
  • Loading branch information
fentie committed Sep 11, 2011
2 parents 92e5dc6 + 8a7807f commit 9e3b6b1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Inspekt/Cage.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,13 @@ public function count()
*/
public function loadHTMLPurifier($path = null, $opts = null)
{
if (isset($path)) {
include_once $path;
} else {
include_once 'HTMLPurifier.auto.php';
}
if (!class_exists('HTMLPurifier')) {
if (isset($path)) {
include_once $path;
} else {
include_once 'HTMLPurifier.auto.php';
}
}

$config = null;
if (isset($opts) && is_array($opts)) {
Expand Down

0 comments on commit 9e3b6b1

Please sign in to comment.