Issue Bug Closed

#96377Undefined array key "linkWrap" in TextMenuContentObject if ATagBeforeWrap=1

Julian Hofmann 12/17/21, 09:25 updated 10/04/22, 14:14

Description

There’s an undefined array key “linkWrap” in \TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject::writeMenu() in the case of ATagBeforeWrap (first case):

            if ($this->I['val']['ATagBeforeWrap'] ?? false) {
                $wrapPartsBefore = explode('|', $this->I['val']['linkWrap']);
                $wrapPartsAfter = ['', ''];
            } else {
                $wrapPartsBefore = ['', ''];
                $wrapPartsAfter = explode('|', $this->I['val']['linkWrap'] ?? '');
            }

Normally the `linkWrap` should not be empty if someone activates `ATagBeforeWrap` because it’s nonsensical. But handling it does not make a lot of effort.

Reviews 2

History 24

  1. Gerrit Code Review pushed patch set 1 for main to change 72793 status New Under Review 12/22/21, 14:39

  2. Gerrit Code Review pushed patch set 1 for 11.5 to change 72784 12/23/21, 12:51

  3. Chris Müller commented and changed status Under Review Resolved done 0 % 100 % 12/23/21, 12:55

    Applied in changeset commit:f8d021c8b7c43bfb759bd49923e3f70bf907187d.

  4. Benni Mack changed status Resolved Closed 10/04/22, 14:14