Bug #98468
closedPHP Warning: Undefined array key "stdWrap2" in TextMenuContentObject.php line 123
100%
Description
PHP Warning: Undefined array key "stdWrap2" in /data/www/sites/baden-wuerttemberg.de/shared/typo3_src/typo3_src-11.5.16/typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php line 123
Code:
if (($this->I['val']['stdWrap2'] ?? false) || isset($this->I['val']['stdWrap2.'])) {
If $this->I['val']['stdWrap2'] isn't set this will produce a PHP Warning.
Like this?
if (! isset($this->I['val']['stdWrap2'])){ $this->I['val']['stdWrap2'] = ''; } if (($this->I['val']['stdWrap2'] ?? false) || isset($this->I['val']['stdWrap2.'])) { $stdWrap2 = (string)(isset($this->I['val']['stdWrap2.']) ? $this->WMcObj->stdWrap('|', $this->I['val']['stdWrap2.']) : '|'); $wrapPartsStdWrap = explode($this->I['val']['stdWrap2'] ?: '|', $stdWrap2); } else { $wrapPartsStdWrap = ['', '']; }
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/+/76005
Updated by Gerrit Code Review about 2 years ago
Patch set 2 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/+/76005
Updated by Gerrit Code Review about 2 years ago
Patch set 3 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/+/76005
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/+/76073
Updated by Stefan Bürk about 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 00acb38d36bd690d952cafc00e77de209ea3aae3.