Skip to content

Commit

Permalink
Fix missing media mime type
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-newvisibility authored Apr 5, 2024
1 parent 7568fc2 commit 5efd5de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Document/MediaViewObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ class MediaViewObject
*/
protected $formats = '{}';

/**
* @var string
*
* @Property(type="keyword")
*/
public $mimeType;

/**
* @var string
*
Expand All @@ -67,6 +74,7 @@ public function setData(Media $media)
$this->id = $media->getId();
$this->title = $media->getTitle();
$this->setFormats($media->getFormats());
$this->mimeType = $media->getMimeType();

Check failure on line 77 in Document/MediaViewObject.php

View workflow job for this annotation

GitHub Actions / PHP Lint

Property Sulu\Bundle\ArticleBundle\Document\MediaViewObject::$mimeType (string) does not accept string|null.
$this->url = $media->getUrl();
$this->copyright = $media->getCopyright();

Expand Down

0 comments on commit 5efd5de

Please sign in to comment.