From 25128d45396807b9f27bcfef11b06d2311fecbb0 Mon Sep 17 00:00:00 2001 From: Peter Kraume <peter.kraume@gmx.de> Date: Sun, 31 Jul 2022 09:11:23 +0200 Subject: [PATCH] [BUGFIX] Fix PHP 8.1 warnings in ExtbasePluginEnhancer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: #98059 Releases: main, 11.5 Change-Id: I078db9039c2f0acb05933fa6a86ca5d73b3fb5d7 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75337 Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com> Tested-by: Stefan Bürk <stefan@buerk.tech> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../sysext/extbase/Classes/Routing/ExtbasePluginEnhancer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/extbase/Classes/Routing/ExtbasePluginEnhancer.php b/typo3/sysext/extbase/Classes/Routing/ExtbasePluginEnhancer.php index a357eb002201..6cf8000386a1 100644 --- a/typo3/sysext/extbase/Classes/Routing/ExtbasePluginEnhancer.php +++ b/typo3/sysext/extbase/Classes/Routing/ExtbasePluginEnhancer.php @@ -200,10 +200,10 @@ class ExtbasePluginEnhancer extends PluginEnhancer } $controller = $route->getDefault('_controller'); [$controllerName, $actionName] = explode('::', $controller); - if ($controllerName !== $parameters[$this->namespace]['controller']) { + if (!isset($parameters[$this->namespace]['controller']) || $controllerName !== $parameters[$this->namespace]['controller']) { return false; } - if ($actionName !== $parameters[$this->namespace]['action']) { + if (!isset($parameters[$this->namespace]['action']) || $actionName !== $parameters[$this->namespace]['action']) { return false; } return true; -- GitLab