Skip to content

Commit

Permalink
CRUDController::editAction now respects $id param
Browse files Browse the repository at this point in the history
  • Loading branch information
curry684 committed Jun 17, 2016
1 parent c5d657c commit 4815b7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Controller/CRUDController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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) {
Expand Down

0 comments on commit 4815b7a

Please sign in to comment.