diff --git a/app/Http/Controllers/ControlController.php b/app/Http/Controllers/ControlController.php index 91661ec4..5f67ac33 100644 --- a/app/Http/Controllers/ControlController.php +++ b/app/Http/Controllers/ControlController.php @@ -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++) {