diff options
author | wn_ <[email protected]> | 2022-08-12 15:31:19 +0000 |
---|---|---|
committer | wn_ <[email protected]> | 2022-08-12 17:58:38 +0000 |
commit | 3487c922b3f34449fecdddebe1fd2ee3b8c42e65 (patch) | |
tree | 57b18bf1a6ec210aa26a80cf1f2d2fdf0888f5da /classes/rpc.php | |
parent | a63c949a5522a8fdeae2dfa77bb39565727f7a0a (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/rpc.php')
-rwxr-xr-x | classes/rpc.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/rpc.php b/classes/rpc.php index dbb54cec5..bb14225be 100755 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -77,7 +77,7 @@ class RPC extends Handler_Protected { $sth = $this->pdo->prepare("DELETE FROM ttrss_user_entries WHERE ref_id IN ($ids_qmarks) AND owner_uid = ?"); - $sth->execute(array_merge($ids, [$_SESSION['uid']])); + $sth->execute([...$ids, $_SESSION['uid']]); Article::_purge_orphans(); @@ -364,7 +364,7 @@ class RPC extends Handler_Protected { WHERE ref_id IN ($ids_qmarks) AND owner_uid = ?"); } - $sth->execute(array_merge($ids, [$_SESSION['uid']])); + $sth->execute([...$ids, $_SESSION['uid']]); } /** @@ -388,7 +388,7 @@ class RPC extends Handler_Protected { WHERE ref_id IN ($ids_qmarks) AND owner_uid = ?"); } - $sth->execute(array_merge($ids, [$_SESSION['uid']])); + $sth->execute([...$ids, $_SESSION['uid']]); } function log(): void { |