From dd3d8e38398e239ec801d94cd065a2b8af4a6ad4 Mon Sep 17 00:00:00 2001
From: Josua Vogel <j.vogel97@web.de>
Date: Fri, 27 May 2022 16:02:54 +0200
Subject: [PATCH] [BUGFIX] Avoid invalid type exception in
 FinisherVariableProvider

Guard invalid argument type exception by using null coalescing operator
in `\TYPO3\CMS\Form\Domain\Finishers\FinisherVariableProvider`.

Resolves: #97699
Releases: main, 11.5
Change-Id: I6312fb35d52857004e0467a20e215fc4095e0037
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74832
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
---
 .../form/Classes/Domain/Finishers/FinisherVariableProvider.php  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/form/Classes/Domain/Finishers/FinisherVariableProvider.php b/typo3/sysext/form/Classes/Domain/Finishers/FinisherVariableProvider.php
index 6b77ae9d6e6a..e6a3682b7be4 100644
--- a/typo3/sysext/form/Classes/Domain/Finishers/FinisherVariableProvider.php
+++ b/typo3/sysext/form/Classes/Domain/Finishers/FinisherVariableProvider.php
@@ -97,7 +97,7 @@ final class FinisherVariableProvider implements \ArrayAccess, \IteratorAggregate
     public function exists($finisherIdentifier, $key): bool
     {
         try {
-            ArrayUtility::getValueByPath($this->objects[$finisherIdentifier], $key, '.');
+            ArrayUtility::getValueByPath($this->objects[$finisherIdentifier] ?? [], $key, '.');
         } catch (MissingArrayPathException $e) {
             return false;
         }
-- 
GitLab