diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 3f7664f..73dd3fb 100644 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -169,7 +169,7 @@ final class ApiController extends Controller public function apiReportGet(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void { /** @var \Modules\QualityManagement\Models\Report $report */ - $report = ReportMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $report = ReportMapper::get()->where('id', $request->getDataInt('id') ?? 0)->execute(); $this->createStandardReturnResponse($request, $response, $report); } @@ -191,7 +191,7 @@ final class ApiController extends Controller /** @var \Modules\QualityManagement\Models\Report $old */ $old = ReportMapper::get() ->with('task') - ->where('id', (int) $request->getData('id')) + ->where('id', $request->getDataInt('id') ?? 0) ->execute(); $new = $this->updateReportFromRequest($request, clone $old); diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 68f8157..045959a 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -146,7 +146,7 @@ final class BackendController extends Controller ->with('task/attributes/type') ->with('task/attributes/value') ->with('task/for') - ->where('id', (int) $request->getData('id')) + ->where('id', $request->getDataInt('id') ?? 0) ->where('task/tags/title/language', $request->header->l11n->language) ->execute(); diff --git a/Theme/Backend/report-view.tpl.php b/Theme/Backend/report-view.tpl.php index b1f9f4a..c28aaac 100644 --- a/Theme/Backend/report-view.tpl.php +++ b/Theme/Backend/report-view.tpl.php @@ -66,8 +66,8 @@ echo $this->data['nav']->render(); ?>