Fix a return type warning in 'Pref_Filters'.

'Pref_Filters#get_details()' gets passed the ID of an existing filter, so we don't need to handle some edge case of it not existing.
This commit is contained in:
wn_
2025-01-06 14:30:54 +00:00
parent 0da9ef81bd
commit 2eb3c150c2

View File

@@ -763,7 +763,6 @@ class Pref_Filters extends Handler_Protected {
->group_by_expr('f.title, f.match_any_rule, f.inverse') ->group_by_expr('f.title, f.match_any_rule, f.inverse')
->find_one(); ->find_one();
if ($filter) {
$title = $filter->title ?: __('[No caption]'); $title = $filter->title ?: __('[No caption]');
$title_summary = [ $title_summary = [
sprintf( sprintf(
@@ -814,9 +813,6 @@ class Pref_Filters extends Handler_Protected {
]; ];
} }
return [];
}
function join(): void { function join(): void {
/** @var array<int, int> */ /** @var array<int, int> */
$ids = array_map("intval", explode(",", clean($_REQUEST["ids"]))); $ids = array_map("intval", explode(",", clean($_REQUEST["ids"])));