We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I made an upgrade from Smarty 3.1.21 to 3.1.27, after this i am getting this error in some templates:
PHP Fatal error: Cannot use [] for reading in /home/conquist/views_c/83c15fae7d6abe30de328afde91cc87c27947c90_0.file.Imovel.view.tpl.php on line 387
The line 387 starts with:
<?php if ((isset($_smarty_tpl->tpl_vars['__foreach_info']->value[]) ? $_smarty_tpl->tpl_vars['__foreach_info']->value[] : null) < 4) {?> <li><h4><?php echo ('- ').($_smarty_tpl->tpl_vars['info']->value);?> </h4></li> <?php }?>`
I am not seeing how to solve this issue. Anybody can help me please?
Edit 1
The original code is:
{foreach $dadosImovel.nomes_diferenciais as $info} {if $smarty.foreach.info < 4} <li><h4>{'- '|cat:$info}</h4></li> {/if} {/foreach}
The text was updated successfully, but these errors were encountered:
$smarty.foreach is a special Smarty variable for named Smarty 2 style {foreach} tags to access special properties. See http://www.smarty.net/docsv2/en/language.function.foreach.tpl and example 7.10.
$smarty.foreach.info in your case is not valid.
I think you did mean {if $info < 4}.
<li><h4>{'- '|cat:$info}</h4></li> could be simplified like <li><h4>- {$info}</h4></li>
Sorry, something went wrong.
Merge pull request smarty-php#62 from think-ahead/release-2.0.7.1
9035278
Merge release-2.0.7.1 into master branch
No branches or pull requests
Hi,
I made an upgrade from Smarty 3.1.21 to 3.1.27, after this i am getting this error in some templates:
PHP Fatal error: Cannot use [] for reading in /home/conquist/views_c/83c15fae7d6abe30de328afde91cc87c27947c90_0.file.Imovel.view.tpl.php on line 387
The line 387 starts with:
I am not seeing how to solve this issue. Anybody can help me please?
Edit 1
The original code is:
The text was updated successfully, but these errors were encountered: