mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
checking if a variable is an array before doing array_reverse.
This commit is contained in:
parent
d34c78296e
commit
e48fb47d62
4 changed files with 18 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue