فهرست منبع

Revert "Fix CRUDController::editAction ignoring its optional parameter" (#3969)

Sullivan SENECHAL 9 سال پیش
والد
کامیت
a256712831
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      Controller/CRUDController.php

+ 2 - 2
Controller/CRUDController.php

@@ -221,7 +221,7 @@ class CRUDController extends Controller
     /**
      * Edit action.
      *
-     * @param int|string|null $id Optional ID to use instead of globally provided default.
+     * @param int|string|null $id
      *
      * @return Response|RedirectResponse
      *
@@ -234,7 +234,7 @@ class CRUDController extends Controller
         // the key used to lookup the template
         $templateKey = 'edit';
 
-        $id = $id ?: $request->get($this->admin->getIdParameter());
+        $id = $request->get($this->admin->getIdParameter());
         $object = $this->admin->getObject($id);
 
         if (!$object) {