From 6681fb879f7d87b338315524ad7d0ec947ea9d8e Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sat, 22 Mar 2008 18:04:18 +0000 Subject: [PATCH] Check if DOMDocument->doctype is an object before attempting to retrieve prop. git-svn-id: http://htmlpurifier.org/svnroot@1618 48356398-32a2-884e-a903-53898d9a118a --- XHTMLCompiler/FilterManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XHTMLCompiler/FilterManager.php b/XHTMLCompiler/FilterManager.php index c6d0ecd..6102900 100644 --- a/XHTMLCompiler/FilterManager.php +++ b/XHTMLCompiler/FilterManager.php @@ -204,7 +204,7 @@ class XHTMLCompiler_FilterManager * entity definitions as dependencies */ public function analyzeInternalSubset($dom) { - if (empty($dom->doctype)) return; + if (empty($dom->doctype) || !is_object($dom->doctype)) return; $internal_subset = $dom->doctype->internalSubset; if ($internal_subset) { // there are some entities that need to be registered to -- 2.11.4.GIT