Project

General

Profile

Actions

Bug #98154

closed

stdWrap.bytes without base throws exeption in PHP 8 ++

Added by Matthias Kappenberg over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2022-08-17
Due date:
% Done:

100%

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

Description

This throws an error:

10 = TEXT
10 {
    noTrimWrap = | ({file:current:extension}, |)|
    insertData = 1
    data = file:current:size
    bytes = 1
    // regardless of using default or custom labels
    #bytes.labels = iec
    bytes.labels =  " B| KiB| MiB| GiB| TiB| PiB| EiB| ZiB| YiB" 
    // important for PHP 8, if base is not set, the Exception below is thown
    #bytes.base = 1024
}

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception

PHP Warning: Undefined array key "base" in __typo3_src/typo3_src-11.5/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 2085

//
ContentObjectRenderer.php line 2085

return GeneralUtility::formatSize((int)$content, $conf['bytes.']['labels'], $conf['bytes.']['base']);
Actions #1

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

Actions #2

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

Actions #3

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

Actions #4

Updated by Gerrit Code Review over 1 year ago

Patch set 4 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/+/75484

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

Actions #6

Updated by Chris Müller 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