Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using {include} within {capture} #100

Closed
lemon-juice opened this issue Oct 24, 2015 · 4 comments
Closed

Error when using {include} within {capture} #100

lemon-juice opened this issue Oct 24, 2015 · 4 comments

Comments

@lemon-juice
Copy link

A most basic template to reproduce:

{capture}
    {include file="admin/included.tpl"}
{/capture}

Smarty complains with this error: Not matching {capture} open/close in "file:admin/included.tpl".

The contents of the included template does not matter, it can even be an empty file.

This error occurs in the newest build 3.1.28-dev/71 but as far as I can see the bug is a few months old - however, 3.1.27 works fine in this respect.

@uwetews
Copy link
Contributor

uwetews commented Oct 24, 2015

Hi, I can't reproduce it. (now at 3.1.28-dev/72)

@lemon-juice
Copy link
Author

I decoupled the code from my application to be sure that nothing else influences the result and the problem seems easily reproducible. Here is the minimalist application that exhibits the problem, it contains smarty
3.1.28-dev/72 - just run test.php in a browser and the page displays:

Fatal error: Uncaught --> Smarty: Not matching {capture} open/close in "file:admin/included.tpl" <-- thrown in /home/users/user1/public_html/test-smarty/lib/smarty/sysplugins/smarty_internal_template.php on line 254

The same thing happens on my local windows installation PHP 5.5.23 and on a linux remote host (PHP 5.6.14).

@uwetews
Copy link
Contributor

uwetews commented Oct 25, 2015

the fix is now in the master branch

@uwetews uwetews closed this as completed Oct 25, 2015
@lemon-juice
Copy link
Author

Thanks, it works well now.

think-mcunanan pushed a commit to think-mcunanan/smarty that referenced this issue Mar 22, 2023
…2-3rd

Merge release-beauty-2022-3rd into master branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants