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

(3.1.30) @show property not working after a foreach #267

Closed
ghost opened this issue Aug 8, 2016 · 3 comments
Closed

(3.1.30) @show property not working after a foreach #267

ghost opened this issue Aug 8, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 8, 2016

I just tried to upgrade from 3.1.27 to 3.1.30 and every place I use the @show property is broken with the following error:

Notice: Undefined property: Smarty_Variable::$show in ...

I then copy/pasted the example shown in the documentation (http://www.smarty.net/docs/en/language.function.foreach.tpl#foreach.property.show) and that worked fine, no error.

I've reverted back to 3.1.27.

@ghost
Copy link
Author

ghost commented Aug 8, 2016

I investigated a bit more. Simple arrays iterate and work with the @show property without a problem, but when I try an object within $smarty.session, then @show returns the error I mentioned above.

edit

While trying to figure out the change that broke @show for me, I went back to 3.1.29 but that was also broken, so that led me to 3.1.28, which apparently is the culprit for me, since 3.1.27 works fine. The change-log for 3.1.28 also shows several changes in the {foreach} loop, maybe something related to them cause my issue.

@uwetews
Copy link
Contributor

uwetews commented Sep 6, 2016

Can you provide an example?

uwetews added a commit that referenced this issue Sep 9, 2016
…item variable as the properties might be used outside {foreach} #267
@uwetews
Copy link
Contributor

uwetews commented Sep 9, 2016

This is fixed in the master branch

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