Actions
Bug #99845
closedPHP Warning in GifBuilder.php
Start date:
2023-02-06
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
We've git several warnings in
typo3/sysext/frontend/Classes/Imaging/GifBuilder.php
protected function calculateValue($string)
if (isset($this->objBB[$objParts[0]])) {
if ($objParts[1] === 'w') {
$theVal = $this->objBB[$objParts[0]][0];
} elseif ($objParts[1] === 'h') {
$theVal = $this->objBB[$objParts[0]][1];
} elseif ($objParts[1] === 'lineHeight') {
$theVal = $this->objBB[$objParts[0]][2]['lineHeight'];
}
$theVal = (int)$theVal;
}
could / should be:
if (isset($this->objBB[$objParts[0]])) {
if ($objParts[1] === 'w') {
if (isset($this->objBB[$objParts[0]][0])) {
$theVal = $this->objBB[$objParts[0]][0];
}
} elseif ($objParts[1] === 'h') {
if (isset($this->objBB[$objParts[0]][1])) {
$theVal = $this->objBB[$objParts[0]][1];
}
} elseif ($objParts[1] === 'lineHeight') {
if (isset($this->objBB[$objParts[0]][2]['lineHeight'])) {
$theVal = $this->objBB[$objParts[0]][2]['lineHeight'];
}
}
$theVal = (int)$theVal;
}
Updated by Chris Müller almost 2 years ago
Can you state the warnings and give some context when they are thrown? I assume, something with "undefined array key"?
Updated by Ralph Brugger almost 2 years ago
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/+/78041
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/+/78121
Updated by Thomas Hohn over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8507c696f283ffefc2046109db9a178ab7cddc98.
Actions