Avoid errors when noscrape data can't be fetched.
This commit is contained in:
parent
f496af08bb
commit
15296b8036
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue