Skip to content

Commit

Permalink
Hotfix/Properly handle empty image names. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
othercodes committed Mar 28, 2024
1 parent 7d74fbd commit b6aeded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controllers/ImgController.php
Expand Up @@ -10,7 +10,7 @@ class ImgController extends Controller
{
public function __invoke($directory, $image)
{
if(!file_exists("$directory/$image")) {
if (!file_exists("$directory/$image" || empty($image))) {
$directory = 'assets/img';
$image = 'notfound.webp';
}
Expand Down

0 comments on commit b6aeded

Please sign in to comment.