Commit 31443b77 authored by sylvieg's avatar sylvieg

a little error message if the rss that is read is not valid xml

parent aaaf6388
......@@ -102,7 +102,8 @@ class RSSLib extends TikiLib {
xml_set_element_handler($this->parser,"startElementHandler","endElementHandler");
xml_set_character_data_handler($this->parser,"characterDataHandler");
if (!xml_parse($this->parser, $data, 1)) {
return $news;
print("Xml error: ".xml_error_string(xml_get_error_code($this->parser))."<br />");
return $news;
}
xml_parser_free($this->parser);
preg_match_all("/<title>(.*)<\/title>/",$this->buffer,$titles);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment