Bug #94125 ยป RenderViewHelper.php.issue-94125.patch

Patch for TYPO3Fluid\Fluid\ViewHelpers\RenderViewHelper - Gabriel Kaufmann / Typoworx NewMedia, 2021-05-12 12:46

View differences:

RenderViewHelper.php 2021-05-12 14:33:06.353428514 +0200
144 144
        } elseif (!$optional) {
145 145
            throw new \InvalidArgumentException('ViewHelper f:render called without either argument section, partial, renderable or delegate and optional flag is false');
146 146
        }
147

  
148
        if($delegate === null) {
149
            if (!empty($arguments['contentAs'])) {
150
                $renderingContext->getVariableProvider()->add($arguments['contentAs'], $content);
151

  
152
                if (($content = $renderChildrenClosure()) !== null) {
153
                    $renderingContext->getVariableProvider()->remove($arguments['contentAs']);
154
                }
155
            }
156
        }
157

  
147 158
        // Replace empty content with default value. If default is
148 159
        // not set, NULL is returned and cast to a new, empty string
149 160
        // outside of this ViewHelper.
150 161
        if ($content === '') {
151 162
            $content = $arguments['default'] ?: $tagContent;
152 163
        }
164

  
153 165
        return $content;
154 166
    }
155 167
}
    (1-1/1)