From 9561924d026cecebd34da5d905a6eab7476de433 Mon Sep 17 00:00:00 2001 From: davidlancaster Date: Thu, 21 Jan 2021 11:46:02 +1030 Subject: [PATCH] fixing variable name overriding --- .../AttachmentBundle/Controller/AttachmentController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Oro/Bundle/AttachmentBundle/Controller/AttachmentController.php b/src/Oro/Bundle/AttachmentBundle/Controller/AttachmentController.php index 5f629717632..c8762693843 100644 --- a/src/Oro/Bundle/AttachmentBundle/Controller/AttachmentController.php +++ b/src/Oro/Bundle/AttachmentBundle/Controller/AttachmentController.php @@ -59,7 +59,7 @@ public function createAction(Request $request, $entityClass, $entityId) $entityRoutingHelper = $this->getEntityRoutingHelper(); $entity = $entityRoutingHelper->getEntity($entityClass, $entityId); - $entityClass = get_class($entity); + $parentEntityClass = get_class($entity); $attachmentEntity = new Attachment(); $attachmentEntity->setTarget($entity); @@ -67,7 +67,7 @@ public function createAction(Request $request, $entityClass, $entityId) $form = $this->createForm( AttachmentType::class, $attachmentEntity, - ['parentEntityClass' => $entityClass, 'checkEmptyFile' => true] + ['parentEntityClass' => $parentEntityClass, 'checkEmptyFile' => true] ); $formAction = $entityRoutingHelper->generateUrlByRequest(