Actions
Bug #105600
closedPHP Warning: Undefined array key "currentValueKey" in /var/www/html/vendor/typo3/cms-fluid/Classes/ViewHelpers/CObjectViewHelper.php line 117
Start date:
2024-11-14
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
14
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
While invoking the CObjectViewHelper from an other Viewhelper Class, I've ran into undefined array key warnings:
PHP Warning: Undefined array key "currentValueKey" in /var/www/html/vendor/typo3/cms-fluid/Classes/ViewHelpers/CObjectViewHelper.php line 117
PHP Warning: Undefined array key "table" in /var/www/html/vendor/typo3/cms-fluid/Classes/ViewHelpers/CObjectViewHelper.php line 118
As those arguments registered as optional, there should be now array key warning.
My Code:
$cObjectViewHelper->setArguments([
'typoscriptObjectPath' => $blockType,
'data' => $data->getRawRecord()->toArray(),
'context' => $context,
]);
$cObjectViewHelper->setRenderingContext($subView->getRenderingContext());
$content = $cObjectViewHelper->render();
Full version: Source: https://github.com/TYPO3incubator/surfcamp-team-success/blob/main/local_packages/success/Classes/ViewHelpers/RenderBlockViewHelper.php#L87-L91
Actions