1
0
Fork 0

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) { if ($noscrapejson) {
$noscrapedata = json_decode($noscrapejson, true); $noscrapedata = json_decode($noscrapejson, true);
if (is_array($noscrapedata)) if (is_array($noscrapedata)) {
if ($noscrapedata["nick"] != "") if ($noscrapedata["nick"] != "")
return($noscrapedata); return($noscrapedata);
} else
$noscrapedata = array();
} }
$s = fetch_url($url); $s = fetch_url($url);