Merge pull request #40675 from nextcloud/fix/unifiedsearch/search-0

fix(unifiedsearch): Allow searching for "0"
This commit is contained in:
Christoph Wurst 2023-09-28 17:18:37 +02:00 committed by GitHub
commit f174e4a057
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);