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

Smarty v5 Error: {section} Tag First Argument Type Mismatch when opening and closing tag on NoCache #1034

Closed
Khem opened this issue Jun 13, 2024 · 3 comments

Comments

@Khem
Copy link

Khem commented Jun 13, 2024

Error: Smarty\Compile\Base::openTag(): Argument #1 ($compiler) must be of type Smarty\Compiler\Template, string given, called in /var/www/html/vendor/smarty/smarty/src/Compile/Tag/Section.php on line 102.

We have a string passed on $this->openTag('nocache') but expects Template $compiler. Must be the same situation when closing the tag.

Thanks

@Khem Khem changed the title Error: {section} Tag First Argument Type Mismatch when opening and closing tag on NoCache Smarty v5 Error: {section} Tag First Argument Type Mismatch when opening and closing tag on NoCache Jun 13, 2024
@wisskid
Copy link
Contributor

wisskid commented Jun 13, 2024

Do you have an example of the Smarty code that triggers this error?

@Khem
Copy link
Author

Khem commented Jun 13, 2024

Thanks for the reply @wisskid

we can produce the error by {section name=sectionname start=0 loop=1 nocache}

In our codebase we have {section name=sectionname start=0 loop=$loop}` where loop is dynamic.

@wisskid
Copy link
Contributor

wisskid commented Jun 16, 2024

@Khem thanx for your report. The issue has been fixed and released in v5.3.1.

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