Skip to content

Commit

Permalink
Ensure that query string is not null when deminifying a search
Browse files Browse the repository at this point in the history
Old minified searches may have null in the l (lookfor) field, but Query expects a string even though it isn't enforced.
  • Loading branch information
EreMaijala committed Oct 16, 2024
1 parent 6fb7b4b commit fd95c9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/VuFind/src/VuFind/Search/QueryAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function deminify(array $search)
// Basic search
$handler = $search['i'] ?? $search['f'];
return new Query(
$search['l'],
$search['l'] ?? '',
$handler,
$search['o'] ?? null
);
Expand All @@ -92,7 +92,7 @@ public function deminify(array $search)
);
} else {
// Simple query
return new Query($search[0]['l'], $search[0]['i']);
return new Query($search[0]['l'] ?? '', $search[0]['i']);
}
}
}
Expand Down

0 comments on commit fd95c9d

Please sign in to comment.