]> git.mxchange.org Git - friendica-addons.git/blobdiff - fbpost/fbpost.php
checking if a variable is an array before doing array_reverse.
[friendica-addons.git] / fbpost / fbpost.php
index 4270816402e37fc1559a5d73b8c9f251a923550d..ba60f4e64bdca3b6eb7c62ddbec399f340f7e2af 100644 (file)
@@ -1027,6 +1027,10 @@ function fbpost_fetchwall($a, $uid) {
 
        $feed = fetch_url($url);
        $data = json_decode($feed);
+
+       if (!is_array($data->data))
+               return;
+
        $items = array_reverse($data->data);
 
        foreach ($items as $item) {