Upgrade to 3.9.6.1

This commit is contained in:
Bastian Allgeier
2023-07-31 13:04:59 +02:00
parent 544b557c94
commit 035d655ca1
9 changed files with 29 additions and 14 deletions

View File

@@ -140,8 +140,8 @@ return [
'search' => function (
App $kirby,
Collection $collection,
string $query = '',
$params = []
string|null $query = '',
array|string $params = []
): Collection|bool {
if (is_string($params) === true) {
$params = ['fields' => Str::split($params, '|')];
@@ -154,9 +154,8 @@ return [
'words' => false,
];
$collection = clone $collection;
$options = array_merge($defaults, $params);
$query = trim($query);
$options = array_merge($defaults, $params);
$query = trim($query ?? '');
// empty or too short search query
if (Str::length($query) < $options['minlength']) {