Skip to content

Commit

Permalink
Fix a potential null passed to translator in search form.
Browse files Browse the repository at this point in the history
  • Loading branch information
emaijala committed Dec 17, 2024
1 parent 5469db5 commit 2a13561
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion search.php
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,12 @@ function ($field) {
} else {
$field['options'] = $field['listquery'];
}
$field['options'] = array_map('Translator::translate', $field['options']);
$field['options'] = array_map(
function ($s) {
return Translator::translate($s ?? '');
},
$field['options']
);
}

return $field;
Expand Down

0 comments on commit 2a13561

Please sign in to comment.