Skip to content

Commit

Permalink
no exception in Asset::absolute_path
Browse files Browse the repository at this point in the history
  • Loading branch information
passchn committed Sep 21, 2023
1 parent d6a793e commit 0d48039
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Model/Entity/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,8 @@ protected function _getAbsolutePath(): string
if (is_readable($relativeOrAbsolute)) {
return $relativeOrAbsolute;
}
$path = ROOT . $relativeOrAbsolute;
if (is_readable($path)) {
return $path;
}
throw new \Exception('Could not find image file.');

return ROOT . $relativeOrAbsolute;
}

/**
Expand Down

0 comments on commit 0d48039

Please sign in to comment.