summaryrefslogtreecommitdiff
path: root/classes/pref/feeds.php
diff options
context:
space:
mode:
authorwn_ <[email protected]>2022-08-12 15:31:19 +0000
committerwn_ <[email protected]>2022-08-12 17:58:38 +0000
commit3487c922b3f34449fecdddebe1fd2ee3b8c42e65 (patch)
tree57b18bf1a6ec210aa26a80cf1f2d2fdf0888f5da /classes/pref/feeds.php
parenta63c949a5522a8fdeae2dfa77bb39565727f7a0a (diff)
Replace use of 'array_merge' with the spread operator and 'array_push' in various places.
This isn't supported for arrays with string keys until PHP 8.1. https://wiki.php.net/rfc/spread_operator_for_array
Diffstat (limited to 'classes/pref/feeds.php')
-rwxr-xr-xclasses/pref/feeds.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index bb638f166..6cf979b0a 100755
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -172,7 +172,7 @@ class Pref_Feeds extends Handler_Protected {
if ($enable_cats) {
array_push($root['items'], $cat);
} else {
- $root['items'] = array_merge($root['items'], $cat['items']);
+ array_push($root['items'], ...$cat['items']);
}
$sth = $this->pdo->prepare("SELECT * FROM
@@ -202,7 +202,7 @@ class Pref_Feeds extends Handler_Protected {
if ($enable_cats) {
array_push($root['items'], $cat);
} else {
- $root['items'] = array_merge($root['items'], $cat['items']);
+ array_push($root['items'], ...$cat['items']);
}
}
}
@@ -848,7 +848,7 @@ class Pref_Feeds extends Handler_Protected {
if ($qpart) {
$sth = $this->pdo->prepare("UPDATE ttrss_feeds SET $qpart WHERE id IN ($feed_ids_qmarks)
AND owner_uid = ?");
- $sth->execute(array_merge($feed_ids, [$_SESSION['uid']]));
+ $sth->execute([...$feed_ids, $_SESSION['uid']]);
}
}