Actions
Bug #98537
closedPHP Warning: Undefined array key 1 in typo3_src-11.5.16/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 1082
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2022-10-05
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Example:
$parsedUrl = GeneralUtility::explodeUrl2Array('https://www.foobar.de/de/newsletter/taeglich/vom-22-september-2022/?&pk_medium=newsletter&pk_campaign=220922_newsletter_daily&pk_source=newsletter_daily&pk_keyword=');
public static function explodeUrl2Array($string)
{
$output = [];
$p = explode('&', $string);
foreach ($p as $v) {
if ($v !== '') {
[$pK, $pV] = explode('=', $v, 2);
$output[rawurldecode($pK)] = rawurldecode($pV);
}
}
return $output;
}
should be changed into:
public static function explodeUrl2Array($string)
{
$output = [];
$p = explode('&', $string);
foreach ($p as $v) {
if ($v !== '') {
$arValues = explode('=', $v, 2);
$output[rawurldecode($arValues[0])] = isset($arValues[1]) ? rawurldecode($arValues[1]) : '';
}
}
return $output;
}
Updated by Gerrit Code Review about 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76079
Updated by Gerrit Code Review about 2 years ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76057
Updated by Christian Kuhn about 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a8f29211dd2565bacc804a309ab46db4b913eea0.
Actions