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:
@@ -538,7 +538,7 @@ class Pref_Filters extends Handler_Protected {
|
||||
|
||||
$sth = $this->pdo->prepare("DELETE FROM ttrss_filters2 WHERE id IN ($ids_qmarks)
|
||||
AND owner_uid = ?");
|
||||
$sth->execute(array_merge($ids, [$_SESSION['uid']]));
|
||||
$sth->execute([...$ids, $_SESSION['uid']]);
|
||||
}
|
||||
|
||||
private function _save_rules_and_actions(int $filter_id): void {
|
||||
@@ -781,11 +781,11 @@ class Pref_Filters extends Handler_Protected {
|
||||
|
||||
$sth = $this->pdo->prepare("UPDATE ttrss_filters2_rules
|
||||
SET filter_id = ? WHERE filter_id IN ($ids_qmarks)");
|
||||
$sth->execute(array_merge([$base_id], $ids));
|
||||
$sth->execute([$base_id, ...$ids]);
|
||||
|
||||
$sth = $this->pdo->prepare("UPDATE ttrss_filters2_actions
|
||||
SET filter_id = ? WHERE filter_id IN ($ids_qmarks)");
|
||||
$sth->execute(array_merge([$base_id], $ids));
|
||||
$sth->execute([$base_id, ...$ids]);
|
||||
|
||||
$sth = $this->pdo->prepare("DELETE FROM ttrss_filters2 WHERE id IN ($ids_qmarks)");
|
||||
$sth->execute($ids);
|
||||
|
||||
Reference in New Issue
Block a user