Skip to content

Commit

Permalink
better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Nov 1, 2023
1 parent 212028c commit d5369aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Http/Controllers/ControlController.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,10 +562,10 @@ public function plan(int $id)
{
// does not exists in that way
$control = Control::find($id);
if ($control === null) {
return;
}
xxxxx

// Control not found
abort_if($control === null, Response::HTTP_NOT_FOUND, '404 Not Found');

$years = [];
$cur_year = Carbon::now()->year;
for ($i = 0; $i <= 3; $i++) {
Expand Down

0 comments on commit d5369aa

Please sign in to comment.