Skip to content

Incorrect error displayed when there is an error inside of a capture block #1102

@moseslecce

Description

@moseslecce

When you have an error inside a {capture} block, smarty will incorrectly report that there is a syntax error
"Not matching {capture}{/capture} "

Here is an example of code that would produce this error:

<?php
use Smarty\Smarty;
$smarty = new Smarty();
$template = '{$nullVariable = null} {capture} stuff to capture {$nullVariable->someFunction()} {/capture}';
$smarty->display('eval:'.$template);
?>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions