diff --git a/Controller/CRUDController.php b/Controller/CRUDController.php index 0f6127a23b..1a998f1a8f 100644 --- a/Controller/CRUDController.php +++ b/Controller/CRUDController.php @@ -221,7 +221,7 @@ public function deleteAction($id) /** * Edit action. * - * @param int|string|null $id + * @param int|string|null $id Optional ID to use instead of globally provided default. * * @return Response|RedirectResponse * @@ -234,7 +234,7 @@ public function editAction($id = null) // the key used to lookup the template $templateKey = 'edit'; - $id = $request->get($this->admin->getIdParameter()); + $id = $id ?: $request->get($this->admin->getIdParameter()); $object = $this->admin->getObject($id); if (!$object) {