mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 17:08:48 +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
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue