Project

General

Profile

Actions

Bug #71676

closed

FatalError when using Spaceless ViewHelper

Added by Robert Vock about 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2015-11-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When using the SpacelessViewHelper, I get an error everytime I clear all caches and reload the frontend:

#1: PHP Catchable Fatal Error: Argument 2 passed to TYPO3\CMS\Fluid\ViewHelpers\SpacelessViewHelper::renderStatic() must be an instance of Closure, null given, called in typo3/sysext/fluid/Classes/ViewHelpers/SpacelessViewHelper.php on line 50 and defined in typo3/sysext/fluid/Classes/ViewHelpers/SpacelessViewHelper.php line 58

I think the render-function needs to be changed from

public function render()
{
    return static::renderStatic($this->arguments, $this->renderChildrenClosure, $this->renderingContext);
}

to

public function render()
{
    return static::renderStatic($this->arguments, $this->buildRenderChildrenClosure(), $this->renderingContext);
}

Actions

Also available in: Atom PDF