Bug #98483
closedPHP Warning: Undefined array key "foolala" in typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php line 1425
100%
Description
If ypu're trying a flexform that is not stored in the current flexform data you will get:
$this->pi_getFFValue($this->cObj->data['pi_flexform'], "foolala", "sDEF");
This can happen after you've extended the flexform but did not save it everynwhere.
So the value is missing.
This wan't a problem under PHP 7.4 but with PHP 8 you'll get this warning:
PHP Warning: Undefined array key "foolala" in typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php line 1425
Maybe this way?
public function pi_getFFvalueFromSheetArray($sheetArray, $fieldNameArr, $value)
{
$tempArr = $sheetArray;
foreach ($fieldNameArr as $k => $v) {
if (MathUtility::canBeInterpretedAsInteger($v)) {
if (is_array($tempArr)) {
$c = 0;
foreach ($tempArr as $values) {
if ($c == $v) {
$tempArr = $values;
break;
}
$c++;
}
}
} else {
if (isset($tempArr[$v])){
$tempArr = $tempArr[$v];
}
}
}
return isset($tempArr[$value]) ? $tempArr[$value] : '';
}
Updated by Gerrit Code Review about 2 years 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/+/75942
Updated by Gerrit Code Review about 2 years 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/+/75942
Updated by Gerrit Code Review about 2 years 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/+/75896
Updated by Georg Ringer about 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 11503dc179c42e8bc7619209770518c7e225dde9.