Skip to content

Avoid multiple calls to error handler #1348

@s2b

Description

@s2b

Fluid's error handler seems to be called multiple times in some circumstances. One example is calling a ViewHelper with an undeclared argument:

<f:format.trim value="test" foo="bar" />

With the new nested exception, this leads to 3 exceptions instead of 2:

#1773227091 TYPO3Fluid\Fluid\Core\ViewHelper\Exception
TYPO3Fluid\Fluid\Core\ViewHelper\Exception in /var/www/html/typo3conf/ext/theme/Resources/Private/Components/Test/Test.fluid.html:
TYPO3Fluid\Fluid\Core\ViewHelper\UndeclaredArgumentException in /var/www/html/typo3conf/ext/theme/Resources/Private/Components/Test/Test.fluid.html:
Undeclared arguments passed to ViewHelper TYPO3Fluid\Fluid\ViewHelpers\Format\TrimViewHelper: foo. Valid arguments are: value, characters, side
(/var/www/html/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php:314)
(/var/www/html/vendor/typo3fluid/fluid/src/Core/ErrorHandler/StandardErrorHandler.php:35)

This is probably related to the TemplateParser catching ViewHelper exceptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions