#92105Wrong usage of array_diff inside TYPO3\CMS\Frontend\Utility\CanonicalizationUtility::getParamsToExcludeForCanonicalizedUrl
Description
Hello TYPO3 Team,
as mentioned in the Subject, in this function the use off array_diff is wrong and array_diff_assoc should be used.
Example(pageId === values of other parameters):
URL Parameters id=7&bla=7&blub=7 $urlParameters = array( bla => '7' (1 chars) blub => '7' (1 chars) id => '7' (1 chars)
$paramsToExclude would be empty because, array_diff will test the value, but the key should be testet.
If the value is not the PageId array_diff will work, but not if the values are the same.
If array_diff_assoc would be used, then the result would be correct.
$paramsToExclude = Array( bla => 7, blub => 7 )
Best Regards
Oliver Büker
Reviews 1
History 34
-
Gerrit Code Review pushed patch set 1 for main to change 92481 status
NewUnder Review <span data-processor="relativetime" data-value="2026-01-23T12:25:43+00:00" > 01/23/26, 12:25 </span> -
Simon Schaufelberger changed description <span data-processor="relativetime" data-value="2026-01-23T21:06:52+00:00" > 01/23/26, 21:06 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-01-23T21:15:08+00:00" > 01/23/26, 21:15 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-03-31T09:00:31+00:00" > 03/31/26, 09:00 </span>
Applied in changeset commit:7a3dea5df6dca51a0fb2eadbcce0b40ebb533e5d.