[BUGFIX] Ensure that requirements in RouteEnhancers are optional 54/58554/2
authorBenni Mack <benni@typo3.org>
Tue, 2 Oct 2018 07:39:29 +0000 (09:39 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 2 Oct 2018 08:00:54 +0000 (10:00 +0200)
Resolves: #86539
Releases: master
Change-Id: Ia0a53b713382ae5cbbc9f5b57c82a532ba8f601b
Reviewed-on: https://review.typo3.org/58554
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Classes/Routing/Enhancer/PluginEnhancer.php

index 838e348..257bd51 100644 (file)
@@ -157,7 +157,7 @@ class PluginEnhancer extends AbstractEnhancer implements RoutingEnhancerInterfac
     protected function getNamespacedRequirements(): array
     {
         $requirements = [];
-        foreach ($this->configuration['requirements'] as $name => $value) {
+        foreach ($this->configuration['requirements'] ?? [] as $name => $value) {
             $requirements[$this->namespace . '_' . $name] = $value;
         }
         return $requirements;