Merge pull request #103 from whmyr/support/76

BUGFIX: Reset array_keys for pages field media
This commit is contained in:
Daniel Siepmann 2017-11-28 12:16:40 +01:00 committed by GitHub
commit 2d4ff08ef8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,7 @@ class PagesIndexer extends TcaIndexer
$content = $this->fetchContentForPage($record['uid']); $content = $this->fetchContentForPage($record['uid']);
if ($content !== []) { if ($content !== []) {
$record['content'] = $content['content']; $record['content'] = $content['content'];
$record['media'] = array_unique(array_merge($record['media'], $content['images'])); $record['media'] = array_values(array_unique(array_merge($record['media'], $content['images'])));
} }
parent::prepareRecord($record); parent::prepareRecord($record);
} }