[BUGFIX] LinkHandler creates wrong TS configuration 66/56166/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 14:23:21 +0000 (15:23 +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/56166
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php

index 1c3e40e..2006484 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);