From 15d0d84fe732a3d9a17182739013c4ac31831e80 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Oct 2013 16:41:05 +0200 Subject: SimplePie patch for missing DOMDocument FS#2842 This applies https://github.com/simplepie/simplepie/commit/16160017bf904538c3fe4cacadc1aba19d445106 to properly handle a missing DOMDocument extention. DOMDocument is still needed to properly parse RSS feeds, but the process will no longer fail fatally. --- inc/SimplePie.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'inc/SimplePie.php') diff --git a/inc/SimplePie.php b/inc/SimplePie.php index fd69b4b09..8a9060509 100644 --- a/inc/SimplePie.php +++ b/inc/SimplePie.php @@ -16579,7 +16579,11 @@ class SimplePie_Sanitize if ($type & (SIMPLEPIE_CONSTRUCT_HTML | SIMPLEPIE_CONSTRUCT_XHTML)) { - + if (!class_exists('DOMDocument')) + { + $this->registry->call('Misc', 'error', array('DOMDocument not found, unable to use sanitizer', E_USER_WARNING, __FILE__, __LINE__)); + return ''; + } $document = new DOMDocument(); $document->encoding = 'UTF-8'; $data = $this->preprocess($data, $type); -- cgit v1.2.3