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
This commit is contained in:
Alexandre Alapetite authored and GitHub committed 2018-05-31 19:22:02 +02:00
1 parent 1cba18e3ef
commit 4c8f147238
1 file changed
+1 -1
+1 -1
View File
@@ -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'))