Project

General

Profile

Actions

Bug #105600

closed

PHP Warning: Undefined array key "currentValueKey" in /var/www/html/vendor/typo3/cms-fluid/Classes/ViewHelpers/CObjectViewHelper.php line 117

Added by André Buchmann 9 days ago. Updated 9 days ago.

Status:
Closed
Priority:
Should have
Category:
Fluid
Target version:
-
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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #104786: Avoid renderStatic() in ViewHelpersClosedSimon Praetorius2024-08-30

Actions
Actions

Also available in: Atom PDF