smarty-php / smarty-php/smarty
Incorrect error displayed when there is an error inside of a capture block
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.3k
- Forks
- 709
- PR merge metrics
- No merged PRs in 30d
Description
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);
?>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the PHP reproduction from the issue and tracing how errors inside a {capture} block are reported. Inspect the capture parsing and error-handling paths; done means the underlying template error is reported accurately rather than as an unmatched {capture} pair.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100