Skip to content
Snippets Groups Projects
Commit 654eb5c8 authored by Daniel Bosen's avatar Daniel Bosen
Browse files

Issue #3134222: Error when saving Nexx video without a preview image

parent 86bdb1ca
No related branches found
Tags 8.x-3.5
1 merge request!1Issue #3134222: Error when saving Nexx video without a preview image
......@@ -178,7 +178,7 @@ class NexxVideo extends MediaSourceBase {
case 'thumbnail_uri':
$teaser_field = $this->configuration['teaser_image_field'];
// If a teaser file mapping is given, use this as thumbnail.
if (!empty($teaser_field) && !empty($media->{$teaser_field})) {
if (!empty($teaser_field) && !$media->{$teaser_field}->isEmpty()) {
$teaser_image = $media->{$teaser_field}->first()->entity;
/** @var \Drupal\media\MediaTypeInterface $media_type */
$media_type = $this->entityTypeManager->getStorage('media_type')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment