Skip to content

Commit

Permalink
prevent children conversion when parent failed
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Nov 4, 2024
1 parent 875d89a commit 464d930
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Models/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ public function executeConversion(

if (str_contains($conversion, '.')) {
$parent = $this->getOrExecuteConversion(str($conversion)->beforeLast('.'));
/**
* Parent conversion can't be done, so children can't be executed either.
*/
if (! $parent) {
return null;
}
} else {
$parent = null;
}
Expand Down

0 comments on commit 464d930

Please sign in to comment.