Avoid errors when noscrape data can't be fetched.

This commit is contained in:
Michael Vogel 2016-02-13 22:20:00 +01:00
parent f496af08bb
commit 15296b8036

View File

@ -19,9 +19,11 @@ function scrape_dfrn($url, $dont_probe = false) {
if ($noscrapejson) {
$noscrapedata = json_decode($noscrapejson, true);
if (is_array($noscrapedata))
if (is_array($noscrapedata)) {
if ($noscrapedata["nick"] != "")
return($noscrapedata);
} else
$noscrapedata = array();
}
$s = fetch_url($url);