Skip to content

Commit 7fa064d

Browse files
committed
Fix return findReplyAble
1 parent c5d30bb commit 7fa064d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Http/Requests/CreateReplyRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ public function replyAble(): ReplyAble
3434

3535
private function findReplyAble(int $id, string $type): ReplyAble
3636
{
37-
return match ($type) {
37+
$result = match ($type) {
3838
Thread::TABLE => Thread::find($id),
3939
};
4040

41-
abort(404);
41+
return $result ?? abort(404);
4242
}
4343

4444
public function author(): User

0 commit comments

Comments
 (0)