Actions
Bug #98154
closedstdWrap.bytes without base throws exeption in PHP 8 ++
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