Controller::API() returns null on error, so we can return 404 instead of 500.
This commit is contained in:
@@ -49,7 +49,10 @@ class RadioController extends Controller
|
||||
|
||||
public function program($id)
|
||||
{
|
||||
$apiResult = $this->API('programma/details/' . (int)$id);
|
||||
$apiResult = $this->API('programma/details/' . (int)$id);
|
||||
if($apiResult == null) {
|
||||
return abort(404);
|
||||
}
|
||||
return view('radioprogram', ['program' => new \Model\Program($apiResult)]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user