don't try to parse empty xml with simplepie, throws conversion warning
This commit is contained in:
parent
8fe82d35d4
commit
2464915817
3 changed files with 39 additions and 37 deletions
|
|
@ -624,7 +624,8 @@ function probe_url($url, $mode = PROBE_NORMAL) {
|
|||
|
||||
logger('probe_url: scrape_feed: headers: ' . $a->get_curl_headers(), LOGGER_DATA);
|
||||
|
||||
$feed->set_raw_data($xml);
|
||||
// Don't try and parse an empty string
|
||||
$feed->set_raw_data(($xml) ? $xml : '<?xml version="1.0" encoding="utf-8" ?><xml></xml>');
|
||||
|
||||
$feed->init();
|
||||
if($feed->error())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue