Project

General

Profile

Actions

Bug #98468

closed

PHP Warning: Undefined array key "stdWrap2" in TextMenuContentObject.php line 123

Added by Ralph Brugger over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2022-09-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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 = ['', ''];
            }

Actions #1

Updated by Ralph Brugger over 1 year ago

  • Description updated (diff)
Actions #2

Updated by Ralph Brugger over 1 year ago

  • Description updated (diff)
Actions #3

Updated by Gerrit Code Review over 1 year 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

Actions #4

Updated by Gerrit Code Review over 1 year 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

Actions #5

Updated by Gerrit Code Review over 1 year 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

Actions #6

Updated by Gerrit Code Review over 1 year 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

Actions #7

Updated by Stefan Bürk over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF