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

fix compilation for caching templates #801

Merged
merged 1 commit into from
Sep 18, 2022
Merged

Conversation

Storyxx
Copy link
Contributor

@Storyxx Storyxx commented Sep 16, 2022

We maintain a complex template setup using inheritance and includes.
When activating caching, we get an out of memory error due to a non-terminating recursion.
After stepping through the code there seem to be two possible causes, which when corrected resolve the issue.

The first one being missing parenthesis around the ternary operator which leads to a wrong comparison.

With the second one it seems that the wrong template was compiled.

PHP-version: 8.0
Smarty-version: 4.2.0

@wisskid wisskid merged commit db80246 into smarty-php:master Sep 18, 2022
@wisskid
Copy link
Contributor

wisskid commented Sep 18, 2022

@Storyxx both seem like accidental typos indeed. Wonder how they went unnoticed for so many years.
Anyway, does this fix your problems?

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

Successfully merging this pull request may close these issues.

None yet

2 participants