From: Christoph Wurst Date: Thu, 28 Sep 2023 08:53:07 +0000 (+0200) Subject: fix(unifiedsearch): Allow searching for "0" X-Git-Tag: v26.0.8rc1~15^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f3c1bd610c1a51617c945ed271b0471786986436;p=nextcloud-server.git fix(unifiedsearch): Allow searching for "0" empty("0") evaluates to true Signed-off-by: Christoph Wurst --- diff --git a/core/Controller/UnifiedSearchController.php b/core/Controller/UnifiedSearchController.php index 3290307dc23..62fbc5dcccf 100644 --- a/core/Controller/UnifiedSearchController.php +++ b/core/Controller/UnifiedSearchController.php @@ -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);