]> git.mxchange.org Git - friendica.git/blobdiff - include/Scrape.php
don't try to parse empty xml with simplepie, throws conversion warning
[friendica.git] / include / Scrape.php
index 7b72a199dfe1307a689dbe4d3a3321ac015686be..1df8964f7cccffc825327b628a08633c29914a58 100644 (file)
@@ -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())