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

{include} is a NOP in 3.1.29? #243

Closed
pehrsoderman opened this issue Jun 9, 2016 · 2 comments
Closed

{include} is a NOP in 3.1.29? #243

pehrsoderman opened this issue Jun 9, 2016 · 2 comments

Comments

@pehrsoderman
Copy link

I may have encountered a bug after upgrading to Ubuntu 16.04, smarty 3.1.29 and PHP7. For me, the {include} seems to be a NOP. If I do something like this:

{include file='file_that_exists.tpl'}
{include file='file_that_does_not_exist.tpl'}
{function_name}

in a template, it compiles without complaining. The content of file_that_exists.tpl is not included, so if file_that_exists.tpl contains function_name, I get a crash that looks like this:

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/var/www/views/index.tpl" on line 208 "{function_name}" unknown tag "function_name" <-- thrown in /usr/share/php/smarty3/sysplugins/smarty_internal_templatecompilerbase.php on line 208

This may be a variation of the issue reported as #240.

@pehrsoderman
Copy link
Author

After some further exploration, it turns out that this problem shows up when going from Smarty 3.1.27 to 3.1.28.

@pehrsoderman
Copy link
Author

This was solved by $smarty->merge_compiled_includes = true;

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

1 participant