From 3667b8c13d5bbec5e1e4d923ef0bbfa99919a50e Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Tue, 14 Nov 2023 08:03:45 +0100 Subject: [PATCH] [BUGFIX] prevent exception on filelist module --- Classes/Backend/EventListener/ModifyButtonBarEventListener.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/Backend/EventListener/ModifyButtonBarEventListener.php b/Classes/Backend/EventListener/ModifyButtonBarEventListener.php index ee9b24e..070d1b4 100644 --- a/Classes/Backend/EventListener/ModifyButtonBarEventListener.php +++ b/Classes/Backend/EventListener/ModifyButtonBarEventListener.php @@ -36,6 +36,9 @@ public function __invoke(ModifyButtonBarEvent $event): void $request = $this->getRequest(); $pageId = $request->getQueryParams()['id'] ?? 0; $page = $this->pageRepository->getPage($pageId); + if (empty($page)) { + return; + } if ((int)($page['doktype'] ?? 0) === (int)(EmailTemplateService::getTypoScript()['doktype'] ?? 0)) { $plaintextTypeNum = (int)(EmailTemplateService::getTypoScript()['typeNum'] ?? 0);