From d57cb05a242a3fcac0e537e9e5e2d67a5ca3af7a Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 5 Dec 2021 06:22:04 +0000 Subject: [PATCH] Fix: array_reverse returns the reversed content as return value --- src/Module/Api/Mastodon/Accounts/Followers.php | 2 +- src/Module/Api/Mastodon/Accounts/Following.php | 2 +- src/Module/Api/Mastodon/Accounts/Statuses.php | 2 +- src/Module/Api/Mastodon/Blocks.php | 2 +- src/Module/Api/Mastodon/Bookmarks.php | 2 +- src/Module/Api/Mastodon/Conversations.php | 2 +- src/Module/Api/Mastodon/Favourited.php | 2 +- src/Module/Api/Mastodon/Lists/Accounts.php | 2 +- src/Module/Api/Mastodon/Mutes.php | 2 +- src/Module/Api/Mastodon/ScheduledStatuses.php | 2 +- src/Module/Api/Mastodon/Search.php | 2 +- src/Module/Api/Mastodon/Timelines/Direct.php | 2 +- src/Module/Api/Mastodon/Timelines/Home.php | 2 +- src/Module/Api/Mastodon/Timelines/ListTimeline.php | 2 +- src/Module/Api/Mastodon/Timelines/PublicTimeline.php | 2 +- src/Module/Api/Mastodon/Timelines/Tag.php | 2 +- src/Module/Api/Twitter/Blocks/Ids.php | 2 +- src/Module/Api/Twitter/Blocks/Lists.php | 2 +- src/Module/Api/Twitter/Followers/Ids.php | 2 +- src/Module/Api/Twitter/Followers/Lists.php | 2 +- src/Module/Api/Twitter/Friends/Ids.php | 2 +- src/Module/Api/Twitter/Friends/Lists.php | 2 +- src/Module/Api/Twitter/Friendships/Incoming.php | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Module/Api/Mastodon/Accounts/Followers.php b/src/Module/Api/Mastodon/Accounts/Followers.php index 3e06528bd..cf5d63c7a 100644 --- a/src/Module/Api/Mastodon/Accounts/Followers.php +++ b/src/Module/Api/Mastodon/Accounts/Followers.php @@ -81,7 +81,7 @@ class Followers extends BaseApi DBA::close($followers); if (!empty($request['min_id'])) { - array_reverse($accounts); + $accounts = array_reverse($accounts); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Accounts/Following.php b/src/Module/Api/Mastodon/Accounts/Following.php index 2aace2683..6e65c446e 100644 --- a/src/Module/Api/Mastodon/Accounts/Following.php +++ b/src/Module/Api/Mastodon/Accounts/Following.php @@ -81,7 +81,7 @@ class Following extends BaseApi DBA::close($followers); if (!empty($request['min_id'])) { - array_reverse($accounts); + $accounts = array_reverse($accounts); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Accounts/Statuses.php b/src/Module/Api/Mastodon/Accounts/Statuses.php index 0ab5a2a50..d24af5341 100644 --- a/src/Module/Api/Mastodon/Accounts/Statuses.php +++ b/src/Module/Api/Mastodon/Accounts/Statuses.php @@ -113,7 +113,7 @@ class Statuses extends BaseApi DBA::close($items); if (!empty($request['min_id'])) { - array_reverse($statuses); + $statuses = array_reverse($statuses); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Blocks.php b/src/Module/Api/Mastodon/Blocks.php index a299185ae..38badfaba 100644 --- a/src/Module/Api/Mastodon/Blocks.php +++ b/src/Module/Api/Mastodon/Blocks.php @@ -81,7 +81,7 @@ class Blocks extends BaseApi DBA::close($followers); if (!empty($request['min_id'])) { - array_reverse($accounts); + $accounts = array_reverse($accounts); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Bookmarks.php b/src/Module/Api/Mastodon/Bookmarks.php index a3d00dcd8..a9efacd12 100644 --- a/src/Module/Api/Mastodon/Bookmarks.php +++ b/src/Module/Api/Mastodon/Bookmarks.php @@ -77,7 +77,7 @@ class Bookmarks extends BaseApi DBA::close($items); if (!empty($request['min_id'])) { - array_reverse($statuses); + $statuses = array_reverse($statuses); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Conversations.php b/src/Module/Api/Mastodon/Conversations.php index 6cc364c9c..7bd797a2b 100644 --- a/src/Module/Api/Mastodon/Conversations.php +++ b/src/Module/Api/Mastodon/Conversations.php @@ -91,7 +91,7 @@ class Conversations extends BaseApi DBA::close($convs); if (!empty($request['min_id'])) { - array_reverse($conversations); + $conversations = array_reverse($conversations); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Favourited.php b/src/Module/Api/Mastodon/Favourited.php index 243d119f9..824847433 100644 --- a/src/Module/Api/Mastodon/Favourited.php +++ b/src/Module/Api/Mastodon/Favourited.php @@ -73,7 +73,7 @@ class Favourited extends BaseApi DBA::close($items); if (!empty($request['min_id'])) { - array_reverse($statuses); + $statuses = array_reverse($statuses); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Lists/Accounts.php b/src/Module/Api/Mastodon/Lists/Accounts.php index 96b6f5bc9..ea103b031 100644 --- a/src/Module/Api/Mastodon/Lists/Accounts.php +++ b/src/Module/Api/Mastodon/Lists/Accounts.php @@ -100,7 +100,7 @@ class Accounts extends BaseApi DBA::close($members); if (!empty($request['min_id'])) { - array_reverse($accounts); + $accounts = array_reverse($accounts); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Mutes.php b/src/Module/Api/Mastodon/Mutes.php index 96a0c7eac..80e04f3dd 100644 --- a/src/Module/Api/Mastodon/Mutes.php +++ b/src/Module/Api/Mastodon/Mutes.php @@ -81,7 +81,7 @@ class Mutes extends BaseApi DBA::close($followers); if (!empty($request['min_id'])) { - array_reverse($accounts); + $accounts = array_reverse($accounts); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/ScheduledStatuses.php b/src/Module/Api/Mastodon/ScheduledStatuses.php index a40406e8d..9edad365c 100644 --- a/src/Module/Api/Mastodon/ScheduledStatuses.php +++ b/src/Module/Api/Mastodon/ScheduledStatuses.php @@ -105,7 +105,7 @@ class ScheduledStatuses extends BaseApi DBA::close($posts); if (!empty($request['min_id'])) { - array_reverse($statuses); + $statuses = array_reverse($statuses); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Search.php b/src/Module/Api/Mastodon/Search.php index dcc9969f7..4fc5fe1f1 100644 --- a/src/Module/Api/Mastodon/Search.php +++ b/src/Module/Api/Mastodon/Search.php @@ -167,7 +167,7 @@ class Search extends BaseApi DBA::close($items); if (!empty($min_id)) { - array_reverse($statuses); + $statuses = array_reverse($statuses); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Timelines/Direct.php b/src/Module/Api/Mastodon/Timelines/Direct.php index ea3a296dc..42d42809b 100644 --- a/src/Module/Api/Mastodon/Timelines/Direct.php +++ b/src/Module/Api/Mastodon/Timelines/Direct.php @@ -75,7 +75,7 @@ class Direct extends BaseApi } if (!empty($request['min_id'])) { - array_reverse($statuses); + $statuses = array_reverse($statuses); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Timelines/Home.php b/src/Module/Api/Mastodon/Timelines/Home.php index bc53e9bcf..fb31e37b0 100644 --- a/src/Module/Api/Mastodon/Timelines/Home.php +++ b/src/Module/Api/Mastodon/Timelines/Home.php @@ -98,7 +98,7 @@ class Home extends BaseApi DBA::close($items); if (!empty($request['min_id'])) { - array_reverse($statuses); + $statuses = array_reverse($statuses); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Timelines/ListTimeline.php b/src/Module/Api/Mastodon/Timelines/ListTimeline.php index c3e525f76..3cd2c0bd6 100644 --- a/src/Module/Api/Mastodon/Timelines/ListTimeline.php +++ b/src/Module/Api/Mastodon/Timelines/ListTimeline.php @@ -103,7 +103,7 @@ class ListTimeline extends BaseApi DBA::close($items); if (!empty($request['min_id'])) { - array_reverse($statuses); + $statuses = array_reverse($statuses); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Timelines/PublicTimeline.php b/src/Module/Api/Mastodon/Timelines/PublicTimeline.php index c3ebe7af0..54da38d5e 100644 --- a/src/Module/Api/Mastodon/Timelines/PublicTimeline.php +++ b/src/Module/Api/Mastodon/Timelines/PublicTimeline.php @@ -109,7 +109,7 @@ class PublicTimeline extends BaseApi DBA::close($items); if (!empty($request['min_id'])) { - array_reverse($statuses); + $statuses = array_reverse($statuses); } self::setLinkHeader(); diff --git a/src/Module/Api/Mastodon/Timelines/Tag.php b/src/Module/Api/Mastodon/Timelines/Tag.php index 441de039d..3611b7173 100644 --- a/src/Module/Api/Mastodon/Timelines/Tag.php +++ b/src/Module/Api/Mastodon/Timelines/Tag.php @@ -112,7 +112,7 @@ class Tag extends BaseApi DBA::close($items); if (!empty($request['min_id'])) { - array_reverse($statuses); + $statuses = array_reverse($statuses); } self::setLinkHeader(); diff --git a/src/Module/Api/Twitter/Blocks/Ids.php b/src/Module/Api/Twitter/Blocks/Ids.php index ea8655a63..8a905f0ee 100644 --- a/src/Module/Api/Twitter/Blocks/Ids.php +++ b/src/Module/Api/Twitter/Blocks/Ids.php @@ -79,7 +79,7 @@ class Ids extends ContactEndpoint DBA::close($contacts); if (!empty($min_id)) { - array_reverse($ids); + $ids = array_reverse($ids); } $return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids); diff --git a/src/Module/Api/Twitter/Blocks/Lists.php b/src/Module/Api/Twitter/Blocks/Lists.php index c0322ed6e..1260b9c7b 100644 --- a/src/Module/Api/Twitter/Blocks/Lists.php +++ b/src/Module/Api/Twitter/Blocks/Lists.php @@ -80,7 +80,7 @@ class Lists extends ContactEndpoint DBA::close($contacts); if (!empty($min_id)) { - array_reverse($ids); + $ids = array_reverse($ids); } $return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities); diff --git a/src/Module/Api/Twitter/Followers/Ids.php b/src/Module/Api/Twitter/Followers/Ids.php index 5f203a052..d30238300 100644 --- a/src/Module/Api/Twitter/Followers/Ids.php +++ b/src/Module/Api/Twitter/Followers/Ids.php @@ -84,7 +84,7 @@ class Ids extends ContactEndpoint DBA::close($followers); if (!empty($min_id)) { - array_reverse($ids); + $ids = array_reverse($ids); } $return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids); diff --git a/src/Module/Api/Twitter/Followers/Lists.php b/src/Module/Api/Twitter/Followers/Lists.php index a812e38da..5f6696341 100644 --- a/src/Module/Api/Twitter/Followers/Lists.php +++ b/src/Module/Api/Twitter/Followers/Lists.php @@ -85,7 +85,7 @@ class Lists extends ContactEndpoint DBA::close($followers); if (!empty($min_id)) { - array_reverse($ids); + $ids = array_reverse($ids); } $return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities); diff --git a/src/Module/Api/Twitter/Friends/Ids.php b/src/Module/Api/Twitter/Friends/Ids.php index 62164840d..dfc5ba4e5 100644 --- a/src/Module/Api/Twitter/Friends/Ids.php +++ b/src/Module/Api/Twitter/Friends/Ids.php @@ -84,7 +84,7 @@ class Ids extends ContactEndpoint DBA::close($followers); if (!empty($min_id)) { - array_reverse($ids); + $ids = array_reverse($ids); } $return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids); diff --git a/src/Module/Api/Twitter/Friends/Lists.php b/src/Module/Api/Twitter/Friends/Lists.php index 57841c3c9..7b38ed366 100644 --- a/src/Module/Api/Twitter/Friends/Lists.php +++ b/src/Module/Api/Twitter/Friends/Lists.php @@ -85,7 +85,7 @@ class Lists extends ContactEndpoint DBA::close($followers); if (!empty($min_id)) { - array_reverse($ids); + $ids = array_reverse($ids); } $return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities); diff --git a/src/Module/Api/Twitter/Friendships/Incoming.php b/src/Module/Api/Twitter/Friendships/Incoming.php index 8a4a99565..fed2bffbc 100644 --- a/src/Module/Api/Twitter/Friendships/Incoming.php +++ b/src/Module/Api/Twitter/Friendships/Incoming.php @@ -79,7 +79,7 @@ class Incoming extends ContactEndpoint DBA::close($contacts); if (!empty($min_id)) { - array_reverse($ids); + $ids = array_reverse($ids); } $return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids);