summaryrefslogtreecommitdiff
path: root/inc/SimplePie.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-10-12 16:41:05 +0200
committerAndreas Gohr <andi@splitbrain.org>2013-10-12 16:41:05 +0200
commit15d0d84fe732a3d9a17182739013c4ac31831e80 (patch)
treedf2562f9d7992a9751371086e0e50d72c3f941ea /inc/SimplePie.php
parentbe3cc6ab00486166279563052bee534bfc992917 (diff)
downloadrpg-15d0d84fe732a3d9a17182739013c4ac31831e80.tar.gz
rpg-15d0d84fe732a3d9a17182739013c4ac31831e80.tar.bz2
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.
Diffstat (limited to 'inc/SimplePie.php')
-rw-r--r--inc/SimplePie.php6
1 files changed, 5 insertions, 1 deletions
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);