-
Notifications
You must be signed in to change notification settings - Fork 707
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
Check compatability of empty, reset, current, end, prev, next and isset in v5 #988
Comments
I want to upgrade from Smarty v4.5.3 => to v5.* in my PHP Framework https://emvicy.com/ on branch 2.x (https://github.com/emvicy/Emvicy/tree/2.x) and Smarty in v5.4.0 gives me this kind of error. example <code>
/* array $aToolbar.aPathParam */
{if true === empty($aToolbar.aPathParam)}
...true....
{else}
...false...
{/if}
</code> error
I could not find any help on this specific topic yet (looked after also in https://smarty-php.github.io/smarty/stable/upgrading/#removed-smarty-api-methods) So - How to handle or rewrite those kind of template code to get it work in Smarty 5 ? |
Thank you for your answer, but unfortunately it doesn't really help me. I had already read that native php functions are no longer supported and that plugins should be registered instead (and I'm not happy about that). I am very familiar with the use of plugins etc. in Smarty. The question I am asking is a bit different. I do need such expressions as shown below in templates. formerly {if true === empty($aVar)} ... {/if} future ? {if true === ($aVar|emptyModifier)} ... {/if} I had not found anything about this. Sorry for my perhaps unclear previous formulation. |
You shouldn't have to change your templates at all. |
Smarty v4 has special handling for empty, reset, current, end, prev, next and isset in certain contexts. Check if behavior is consistent in v5.
The text was updated successfully, but these errors were encountered: