Skip to content

Commit 9c13b6b

Browse files
author
Manfredi Petruso
committed
Fixes #36
1 parent c355d32 commit 9c13b6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Uploaders/MediaUploader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ public function getMediaIdentifier($media, $entry = null)
267267
$path = PathGeneratorFactory::create($media);
268268

269269
if ($entry && ! empty($entry->mediaConversions)) {
270-
$conversion = array_filter($entry->mediaConversions, function ($item) use ($media) {
270+
$conversion = array_values(array_filter($entry->mediaConversions, function ($item) use ($media) {
271271
return $item->getName() === $this->getConversionToDisplay($media);
272-
})[0] ?? null;
272+
}))[0] ?? null;
273273

274274
if (! $conversion) {
275275
return $path->getPath($media).$media->file_name;

0 commit comments

Comments
 (0)