aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-05-31 19:22:02 +0200
committerGravatar GitHub <noreply@github.com> 2018-05-31 19:22:02 +0200
commit4c8f1472382e9bf4f5d0cea0d9fe886c7bbe971b (patch)
treef97b96eeafc17cfc2994c4888a8eaeb3134822ad
parent1cba18e3ef15958f9f962dc906705b5ae890b357 (diff)
Suppress XML error during conversion attempt (#1909)
Using LIBXML_NOERROR. Seems to be necessary for newer PHP versions because the at sign does not suppress warnings. In a FreshRSS-specific SimplePie section. Warning: DOMDocument::loadXML(): Namespace prefix media on content is not defined in Entity, line: 42 in /..../FreshRSS/lib/SimplePie/SimplePie/Parser.php on line 144
-rw-r--r--lib/SimplePie/SimplePie/Parser.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/SimplePie/SimplePie/Parser.php b/lib/SimplePie/SimplePie/Parser.php
index 9348382ad..bdcc1a516 100644
--- a/lib/SimplePie/SimplePie/Parser.php
+++ b/lib/SimplePie/SimplePie/Parser.php
@@ -141,7 +141,7 @@ class SimplePie_Parser
$dom = new DOMDocument();
$dom->recover = true;
$dom->strictErrorChecking = false;
- @$dom->loadXML($data);
+ @$dom->loadXML($data, LIBXML_NOERROR | LIBXML_NOWARNING);
$this->encoding = $encoding = $dom->encoding = 'UTF-8';
$data2 = $dom->saveXML();
if (function_exists('mb_convert_encoding'))