Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2020-09-12 12:25:46 +0300
committerGitHub <noreply@github.com>2020-09-12 12:25:46 +0300
commit3ffd09d3f191def63ad2766368aaef62b333fcd1 (patch)
treed7f650d20637a420065e56905a2c51ff17615976
parent8ab2d5a8d95288ce6909fc7fb14b419ab15b5a86 (diff)
parent0022b63fe88235d66e58f233a8ee61cc2618084c (diff)
Merge pull request #22806 from nextcloud/fix/unified-search-indexed-result
Fix serializing indexed unified search array as object
-rw-r--r--lib/public/Search/SearchResult.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/public/Search/SearchResult.php b/lib/public/Search/SearchResult.php
index 1a07f24b33a..e70c70f1aaa 100644
--- a/lib/public/Search/SearchResult.php
+++ b/lib/public/Search/SearchResult.php
@@ -28,6 +28,7 @@ declare(strict_types=1);
namespace OCP\Search;
use JsonSerializable;
+use function array_values;
/**
* @since 20.0.0
@@ -107,7 +108,7 @@ final class SearchResult implements JsonSerializable {
return [
'name' => $this->name,
'isPaginated' => $this->isPaginated,
- 'entries' => $this->entries,
+ 'entries' => array_values($this->entries),
'cursor' => $this->cursor,
];
}