mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-22 18:50:15 +00:00
array_reverse in line 1233 sometimes got no array as 1st arg
This commit is contained in:
parent
bc63728733
commit
4fa6a3015f
1 changed files with 9 additions and 6 deletions
|
@ -1230,13 +1230,16 @@ function pumpio_fetchinbox(&$a, $uid) {
|
|||
$url .= '?since='.urlencode($last_id);
|
||||
|
||||
$success = $client->CallAPI($url, 'GET', array(), array('FailOnAccessError'=>true), $user);
|
||||
$posts = array_reverse($user->items);
|
||||
|
||||
if (count($posts))
|
||||
foreach ($posts as $post) {
|
||||
$last_id = $post->id;
|
||||
pumpio_dopost($a, $client, $uid, $self, $post, $own_id);
|
||||
}
|
||||
if ($user->items) {
|
||||
$posts = array_reverse($user->items);
|
||||
|
||||
if (count($posts))
|
||||
foreach ($posts as $post) {
|
||||
$last_id = $post->id;
|
||||
pumpio_dopost($a, $client, $uid, $self, $post, $own_id);
|
||||
}
|
||||
}
|
||||
|
||||
set_pconfig($uid,'pumpio','last_id', $last_id);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue