From 4f56bb24643345c0a2d7295ff9233bcae3493590 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Wed, 17 Nov 2021 11:58:15 +0100 Subject: [PATCH] fix: Creation of entity in createEntity(). Issue introduced in 5432242376f17b894247b97d3ec39cf5ec1e8bf4. --- .../CRUD/Controller/AbstractCRUDController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php index ae19fb433..f88982070 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php @@ -46,7 +46,9 @@ abstract class AbstractCRUDController extends AbstractController protected function createEntity(string $action, Request $request): object { - return new ($this->getEntityClass()); + $class = $this->getEntityClass(); + + return new $class; } /**