Ignore XML parsing error (old libxml issues)
This commit is contained in:
parent
30ea882cc7
commit
9b6dfeca4e
8
vendor/PicoFeed/Filter.php
vendored
8
vendor/PicoFeed/Filter.php
vendored
@ -129,13 +129,7 @@ class Filter
|
|||||||
xml_set_element_handler($parser, 'startTag', 'endTag');
|
xml_set_element_handler($parser, 'startTag', 'endTag');
|
||||||
xml_set_character_data_handler($parser, 'dataTag');
|
xml_set_character_data_handler($parser, 'dataTag');
|
||||||
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);
|
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);
|
||||||
|
xml_parse($parser, $this->input, true); // We ignore parsing error (for old libxml)
|
||||||
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_parser_free($parser);
|
xml_parser_free($parser);
|
||||||
|
|
||||||
return $this->data;
|
return $this->data;
|
||||||
|
1
vendor/PicoFeed/Parsers/Atom.php
vendored
1
vendor/PicoFeed/Parsers/Atom.php
vendored
@ -9,7 +9,6 @@ class Atom extends Parser
|
|||||||
$this->content = $this->normalizeData($this->content);
|
$this->content = $this->normalizeData($this->content);
|
||||||
|
|
||||||
\libxml_use_internal_errors(true);
|
\libxml_use_internal_errors(true);
|
||||||
|
|
||||||
$xml = \simplexml_load_string($this->content);
|
$xml = \simplexml_load_string($this->content);
|
||||||
|
|
||||||
if ($xml === false) {
|
if ($xml === false) {
|
||||||
|
Loading…
Reference in New Issue
Block a user