]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(unifiedsearch): Allow searching for "0" 40684/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Thu, 28 Sep 2023 08:53:07 +0000 (10:53 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Thu, 28 Sep 2023 15:50:10 +0000 (15:50 +0000)
empty("0") evaluates to true

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
core/Controller/UnifiedSearchController.php

index 3290307dc23fb01cf0a0287be8cb88bde217facb..62fbc5dcccf9626b1f6542907f284697d3f4b8c2 100644 (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);