From 15296b8036a670fd32891d71927df81d9db6293a Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 13 Feb 2016 22:20:00 +0100 Subject: [PATCH] Avoid errors when noscrape data can't be fetched. --- include/Scrape.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/Scrape.php b/include/Scrape.php index bc6aebbdcf..d54a838afd 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -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); -- 2.39.5