fix(unifiedsearch): Allow searching for "0"

empty("0") evaluates to true

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2023-09-28 10:53:07 +02:00 committed by Arthur Schiwon
parent f14a01cc1e
commit 825bb29287

View file

@ -92,7 +92,7 @@ class UnifiedSearchController extends OCSController {
?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);