Merge pull request #22806 from nextcloud/fix/unified-search-indexed-result

Fix serializing indexed unified search array as object
This commit is contained in:
John Molakvoæ 2020-09-12 11:25:46 +02:00 committed by GitHub
commit 3ffd09d3f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@ declare(strict_types=1);
namespace OCP\Search; namespace OCP\Search;
use JsonSerializable; use JsonSerializable;
use function array_values;
/** /**
* @since 20.0.0 * @since 20.0.0
@ -107,7 +108,7 @@ final class SearchResult implements JsonSerializable {
return [ return [
'name' => $this->name, 'name' => $this->name,
'isPaginated' => $this->isPaginated, 'isPaginated' => $this->isPaginated,
'entries' => $this->entries, 'entries' => array_values($this->entries),
'cursor' => $this->cursor, 'cursor' => $this->cursor,
]; ];
} }