[BUGFIX] LinkHandler creates wrong TS configuration 52/56152/2
authorStefan Froemken <froemken@gmail.com>
Thu, 15 Mar 2018 09:06:45 +0000 (10:06 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Thu, 15 Mar 2018 13:34:10 +0000 (14:34 +0100)
DatabaseRecordLinkBuilder creates a wrong
TypoScript configuration because of using
array_merge_recursive which joins all array elements
instead of replacing them.

Resolves: #84116
Releases: master,8.7
Change-Id: I212b70f86baf2929f9466fa665cec30fe477c6b8
Reviewed-on: https://review.typo3.org/56152
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Wolfgang Wagner <wolfgang.wagner.fn@gmail.com>
Reviewed-by: Pascal Rinker <prinker@jweiland.net>
Tested-by: Pascal Rinker <prinker@jweiland.net>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php

index fd38869..9c9c751 100644 (file)
@@ -62,7 +62,7 @@ class DatabaseRecordLinkBuilder extends AbstractTypolinkBuilder
         // Unset the parameter part of the given TypoScript configuration while keeping
         // config that has been set in addition.
         unset($conf['parameter.']);
-        $typoScriptConfiguration = array_merge_recursive($typoScriptConfiguration, $conf);
+        $typoScriptConfiguration = array_replace_recursive($conf, $typoScriptConfiguration);
 
         // Build the full link to the record
         $localContentObjectRenderer = GeneralUtility::makeInstance(ContentObjectRenderer::class);