Skip to content

Commit 2f0c5f7

Browse files
committed
fix: separate null checks for contentDto and templateDto in FrontendController
1 parent 2ccc45a commit 2f0c5f7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Http/Controllers/FrontendController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __invoke(...$args)
2727
$templateDto = $dto->template;
2828
$locale = $dto->locale;
2929

30-
if (is_null($contentDto) || is_null($templateDto)) {
30+
if (is_null($contentDto)) {
3131
abort(404);
3232
}
3333

@@ -43,6 +43,10 @@ public function __invoke(...$args)
4343

4444
}
4545

46+
if (is_null($templateDto)) {
47+
abort(404);
48+
}
49+
4650
if (blank($templateDto->content)) {
4751
abort(404);
4852
}

0 commit comments

Comments
 (0)