Ignore XML parsing error (old libxml issues)

This commit is contained in:
Frederic Guillot 2013-05-22 14:16:34 +02:00
parent 30ea882cc7
commit 9b6dfeca4e
2 changed files with 1 additions and 8 deletions

View File

@ -129,13 +129,7 @@ class Filter
xml_set_element_handler($parser, 'startTag', 'endTag');
xml_set_character_data_handler($parser, 'dataTag');
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);
if (! xml_parse($parser, $this->input, true)) {
//var_dump($this->input);
die(xml_get_current_line_number($parser).'|'.xml_error_string(xml_get_error_code($parser)));
}
xml_parse($parser, $this->input, true); // We ignore parsing error (for old libxml)
xml_parser_free($parser);
return $this->data;

View File

@ -9,7 +9,6 @@ class Atom extends Parser
$this->content = $this->normalizeData($this->content);
\libxml_use_internal_errors(true);
$xml = \simplexml_load_string($this->content);
if ($xml === false) {