diff --git a/fbpost/fbpost.php b/fbpost/fbpost.php index 42708164..ba60f4e6 100644 --- a/fbpost/fbpost.php +++ b/fbpost/fbpost.php @@ -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) { diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index f7841300..5bd82ed8 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -275,6 +275,9 @@ function fromgplus_handleattachments($item) { $post .= "\n[url=".$thumb->url."][img]".$image."[/img][/url]\n"; } break; + case "audio": + $post .= "\n\n[bookmark=".$attachment->url."]".fromgplus_html2bbcode($attachment->displayName)."[/bookmark]\n"; + break; //default: // die($attachment->objectType); } @@ -298,6 +301,9 @@ function fromgplus_fetch($a, $uid) { $lastdate = 0; + if (!is_array($activities->items)) + return; + $reversed = array_reverse($activities->items); foreach($reversed as $item) { diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 393bbfe5..0ffbae6b 100755 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -806,6 +806,10 @@ function statusnet_fetchtimeline($a, $uid) { $parameters["since_id"] = $lastid; $items = $connection->get('statuses/user_timeline', $parameters); + + if (!is_array($items)) + return; + $posts = array_reverse($items); if (count($posts)) { diff --git a/twitter/twitter.php b/twitter/twitter.php index 808768f8..e4848f9d 100755 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -613,6 +613,10 @@ function twitter_fetchtimeline($a, $uid) { $parameters["since_id"] = $lastid; $items = $connection->get('statuses/user_timeline', $parameters); + + if (!is_array($items)) + return; + $posts = array_reverse($items); if (count($posts)) {