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;
}
Actions