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
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user