Browse Source

fix(unifiedsearch): Allow searching for "0"

empty("0") evaluates to true

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
tags/v28.0.0beta1
Christoph Wurst 9 months ago
parent
commit
dbd666e82b
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      core/Controller/UnifiedSearchController.php

+ 1
- 1
core/Controller/UnifiedSearchController.php View File

@@ -100,7 +100,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);

Loading…
Cancel
Save