Skip to content

Commit

Permalink
fix error on youtube media creation
Browse files Browse the repository at this point in the history
  • Loading branch information
tambait committed Oct 20, 2020
1 parent 7d2fa00 commit 586d89a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Validator/Constraints/ImageUploadDimensionValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public function validate($value, Constraint $constraint)
}

try {
if (!$value->getBinaryContent() instanceof File) {
return;
}

$image = $this->imagineAdapter->open($value->getBinaryContent()->getPathname());
} catch (\RuntimeException $e) {
// Do nothing. The parent validator will throw a violation error.
Expand Down

0 comments on commit 586d89a

Please sign in to comment.