summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-09-28 10:53:07 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2023-10-10 09:09:50 +0200
commit825bb292877d080cfd1b3d5b7ca476f53be7b70d (patch)
treea9a90bdc06bb04782235e406e2c3b0d8967ff01c /core
parentf14a01cc1ef6fbff80bc1fbc512799d5aaa62ca7 (diff)
downloadnextcloud-server-825bb292877d080cfd1b3d5b7ca476f53be7b70d.tar.gz
nextcloud-server-825bb292877d080cfd1b3d5b7ca476f53be7b70d.zip
fix(unifiedsearch): Allow searching for "0"
empty("0") evaluates to true Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core')
-rw-r--r--core/Controller/UnifiedSearchController.php2
1 files changed, 1 insertions, 1 deletions
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);