Project

General

Profile

Actions

Bug #98509

closed

TYPO3\CMS\Core\Error\Exception

Added by Claus Harup over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2022-10-03
Due date:
% Done:

100%

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

Description

Running PHP 8.1:

PHP Warning: Undefined array key "uid" in /var/www/typo3_source/typo3_src-11.5.16/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php line 77

if (is_array($pageRecord) && $pageRecord['uid']) {


Files

Actions #1

Updated by Georg Ringer over 1 year ago

  • Status changed from New to Needs Feedback

how can this be reproduced and isn't that maybe more an issue of ext:staticfilecache (opened https://github.com/lochmueller/staticfilecache/issues/369)

Actions #2

Updated by Claus Harup over 1 year ago

Hi Georg

ext:staticfilecache uses core viewhelper: ViewHelpers/Be/PageInfoViewHelper.php, so it is core related imo.

Simply just add isset():

if (is_array($pageRecord) && isset($pageRecord['uid'])) {
...
}

Actions #3

Updated by Tim Lochmüller over 1 year ago

Hi

I also think it is core related. The screenshot is from the root page (no ID or not selectedable page in this context). The ViewHelper already has a "else" condition for a root page information. But the check is invalid. If an admin call the root page with ID 0, the "readPageAccess" will return "['_thePath' => '/']". This is an array, but there is no uid key. So I suggest extending the check in the core ViewHelper to be bulletproof.

Regards,
Tim

Actions #4

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Needs Feedback 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/+/76004

Actions #5

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/+/76014

Actions #6

Updated by Stefan Bürk over 1 year ago

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

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF