-
Notifications
You must be signed in to change notification settings - Fork 715
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
isset on array #498
Comments
Hi, the same happens when using "variable variables" within isset. Template code:
Generated code: The output is generated in the file "smarty_internal_templatecompilerbase.php" (function "compilePHPFunctionCall") on line 633. Is it safe to replace the responsible line of code |
Any update on this issue? |
+1 for backticks substitution in array index
Template
will generate if ((($_smarty_tpl->tpl_vars['foo']->value["prefix_".((string)$_smarty_tpl->tpl_vars['bar']->value)] !== null ))) {?>
1
<?php } with |
I believe this is similar issue to #499 Anyway, I hope to see it resolved soon. |
Duplicate of #453 |
isset
is not generated when we specify the object's property / method as an indexExample:
Code on .tpl:
{if isset($specialOffers[$category->getId()])}gray{/if}
Generated code:
<?php if ((($_smarty_tpl->tpl_vars['specialOffers']->value[$_smarty_tpl->tpl_vars['category']->value->getId()] !== null ))) {?>gray<?php }?>
The text was updated successfully, but these errors were encountered: