Skip to content

Commit

Permalink
fix(unifiedsearch): Allow searching for "0"
Browse files Browse the repository at this point in the history
empty("0") evaluates to true

Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Sep 28, 2023
1 parent 99e287b commit dbd666e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/Controller/UnifiedSearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function search(string $providerId,
?int $limit = null,
$cursor = null,
string $from = ''): DataResponse {
if (empty(trim($term))) {
if (trim($term) === "") {
return new DataResponse(null, Http::STATUS_BAD_REQUEST);
}
[$route, $routeParameters] = $this->getRouteInformation($from);
Expand Down

0 comments on commit dbd666e

Please sign in to comment.