From 4170ad4ae4e7925ada42f530ccf6e123dafebf31 Mon Sep 17 00:00:00 2001 From: i-just Date: Wed, 7 Oct 2026 07:47:34 +0200 Subject: [PATCH] cleanup --- src/controllers/CkeditorController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/controllers/CkeditorController.php b/src/controllers/CkeditorController.php index c7d5df97..ee27aeaf 100644 --- a/src/controllers/CkeditorController.php +++ b/src/controllers/CkeditorController.php @@ -86,7 +86,7 @@ public function actionEntryCardHtml(): Response { $entryId = $this->request->getRequiredBodyParam('entryId'); $siteId = $this->request->getBodyParam('siteId'); - $layoutElementUid = $this->request->getBodyParam('layoutElementUid'); + $layoutElementUid = $this->request->getRequiredBodyParam('layoutElementUid'); // it's okay to limit to provided siteId, as we're "just" after the card html; // all the hard work has already been done @@ -100,6 +100,11 @@ public function actionEntryCardHtml(): Response } $owner = $entry->getOwner(); + + if (!$owner) { + throw new BadRequestHttpException("Invalid entry owner"); + } + /** @var CustomField $layoutElement */ $layoutElement = $owner->getFieldLayout()->getElementByUid($layoutElementUid); /** @var Field $field */