Project

General

Profile

Actions

Bug #95563

closed

Undefined key warnings in ContentObjectRenderer.php

Added by Jochen Roth over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
Start date:
2021-10-11
Due date:
% Done:

100%

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

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


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #94707: Undefined array key / Trying to access array offset on value of type null / PHP Version 8.0.8Closed2021-08-04

Actions
Related to TYPO3 Core - Bug #99866: Undefined array key "sectionIndex." in AbstractMenuContentObject.phpClosed2023-02-07

Actions
Actions #1

Updated by Jochen Roth over 2 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
Actions #2

Updated by Jochen Roth over 2 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
Actions #3

Updated by Jochen Roth over 2 years ago

@Michael Kasten can you please test in latest master. Tried to reproduce these issues but seemed to work without the warnings thrown.

Actions #4

Updated by Michael Kasten over 2 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:

i guess there ary only one fix for AbstractMenuContentObject.php line 973 available.

Hope the information will help you :)

Actions #5

Updated by Michael Kasten over 2 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 :)

Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

Updated by Anonymous over 2 years ago

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

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions #11

Updated by Benjamin Robinson about 1 year ago

  • Related to Bug #99866: Undefined array key "sectionIndex." in AbstractMenuContentObject.php added
Actions

Also available in: Atom PDF