[BUGFIX] Fix handling menuConfig of LanguageMenuProcessor 32/60432/2
authorDaniel Gohlke <daniel.gohlke@extco.de>
Tue, 9 Apr 2019 14:44:58 +0000 (16:44 +0200)
committerRichard Haeser <richard@maxserv.com>
Tue, 9 Apr 2019 18:42:37 +0000 (20:42 +0200)
Use array_merge instead of union (+=) in order to
correctly handle overriding the menu configuration
of the LanguageMenuProcessor.

Resolves: #88123
Releases: master, 9.5
Change-Id: I1f382c11b2f24c052b97af2b7d62a6e0712e10e9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60432
Tested-by: Björn Jacob <bjoern.jacob@tritum.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Richard Haeser <richard@maxserv.com>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Richard Haeser <richard@maxserv.com>
typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php

index b0a4f4d..6c3f3ad 100644 (file)
@@ -312,7 +312,7 @@ class LanguageMenuProcessor implements DataProcessorInterface
      */
     protected function prepareConfiguration(): void
     {
-        $this->menuConfig += $this->processorConfiguration;
+        $this->menuConfig = array_merge($this->menuConfig, $this->processorConfiguration);
 
         // Process languages
         if (empty($this->menuConfig['languages']) && empty($this->menuConfig['languages.'])) {