Skip to content

Commit

Permalink
fix WSOD when media source file is missing (#834)
Browse files Browse the repository at this point in the history
  • Loading branch information
seth-shaw-unlv authored Apr 28, 2021
1 parent 5644455 commit e57c82b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Plugin/Condition/MediaHasMimetype.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function evaluate() {
$mimetypes = explode(',', str_replace(' ', '', $this->configuration['mimetypes']));
foreach ($media as $medium) {
$file = $this->mediaSource->getSourceFile($medium);
if (in_array($file->getMimeType(), $mimetypes)) {
if ($file && in_array($file->getMimeType(), $mimetypes)) {
return TRUE;
}
}
Expand Down

0 comments on commit e57c82b

Please sign in to comment.