Преглед на файлове

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
Alexandre Alapetite преди 8 години
родител
ревизия
4c8f147238
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      lib/SimplePie/SimplePie/Parser.php

+ 1 - 1
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'))