Bug #95563
closedUndefined key warnings in ContentObjectRenderer.php
100%
Description
Undefined array key "typolink." in /var/www/html/typo3_src-11.5.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 1043
$content = (string)$this->typoLink($string, $conf['typolink.']);
#maybe should be
$content = (string)$this->typoLink($string, $conf['typolink.'] ?? []);
Undefined array key "crop" in /var/www/html/typo3_src-11.5.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 1070
$conf[$parameterName] = $this->stdWrap($conf[$parameterName], $conf[$parameterName . '.']);
#maybe should be
$conf[$parameterName] = $this->stdWrap($conf[$parameterName], $conf[$parameterName . '.'] ?? []);
Undefined array key "m." in /var/www/html/typo3_src-11.5.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 4084
$maskArray = $fileArray['m.'];
#maybe should be
$maskArray = $fileArray['m.'] ?? [];
Undefined array key "addQueryString" in /var/www/html/typo3_src-11.5.0/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 627
$getVars = $this->parent_cObj->getQueryArguments($this->conf['addQueryString.']);
#maybe should be
$getVars = $this->parent_cObj->getQueryArguments($this->conf['addQueryString.'] ?? []);
Undefined array key 1 in /var/www/html/typo3_src-11.5.0/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 973
$endKey = $this->parent_cObj->getKey($begin_end[1], $this->tmpl->rootLine);
#maybe should be
$endKey = $this->parent_cObj->getKey($begin_end[1] ?? [], $this->tmpl->rootLine);
As far as I can see :)
Files
Updated by Jochen Roth about 3 years ago
- Related to Bug #94707: Undefined array key / Trying to access array offset on value of type null / PHP Version 8.0.8 added
Updated by Jochen Roth about 3 years ago
Already fixed in latest master:
- Undefined array key 1 in /var/www/html/typo3_src-11.5.0/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 973
- Undefined array key "addQueryString" in /var/www/html/typo3_src-11.5.0/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 627
Updated by Jochen Roth about 3 years ago
@Michael Kasten can you please test in latest master. Tried to reproduce these issues but seemed to work without the warnings thrown.
Updated by Michael Kasten about 3 years ago
Hi Jochen,
shame on me, i told to my collegues all day: every single issue should be a separate ticket, and on my self... damned
Ok here we go im cloned the latest master into my project, and thats is the result
I guess most issues are unfixed because the files are untouched here:
- frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 627
https://github.com/TYPO3/typo3/blob/master/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php#L627
- frontend/Classes/ContentObject/ContentObjectRenderer.php line 4084
https://github.com/TYPO3/typo3/blob/master/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#L4084
- frontend/Classes/ContentObject/ContentObjectRenderer.php line 1070
https://github.com/TYPO3/typo3/blob/master/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#L1070
- frontend/Classes/ContentObject/ContentObjectRenderer.php line 1043
https://github.com/TYPO3/typo3/blob/master/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#L1043
i guess there ary only one fix for AbstractMenuContentObject.php line 973 available.
Hope the information will help you :)
Updated by Michael Kasten about 3 years ago
Some additional informations will maybe help you:
Tested with a regulär DDEV Container with nginx as webserver, no special php debugging settings, for the enviroment see image :)
Updated by Gerrit Code Review about 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71534
Updated by Gerrit Code Review about 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71534
Updated by Gerrit Code Review about 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71534
Updated by Anonymous about 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 694bdc513293e4dd6e6faee15c0297ff4c8d7db2.
Updated by Benjamin Robinson almost 2 years ago
- Related to Bug #99866: Undefined array key "sectionIndex." in AbstractMenuContentObject.php added