From dbd666e82b8ce9e38bf082f8f47647e00e21bce1 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 28 Sep 2023 10:53:07 +0200 Subject: [PATCH] fix(unifiedsearch): Allow searching for "0" empty("0") evaluates to true Signed-off-by: Christoph Wurst --- core/Controller/UnifiedSearchController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Controller/UnifiedSearchController.php b/core/Controller/UnifiedSearchController.php index d0dfd1bf7da90..9704850bb1f27 100644 --- a/core/Controller/UnifiedSearchController.php +++ b/core/Controller/UnifiedSearchController.php @@ -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);