|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ilyalyu Smarty Regular
Joined: 03 Nov 2009 Posts: 72
|
Posted: Sun Nov 25, 2012 8:05 am Post subject: Assigning variable with global scope inside function |
|
|
Assigning variable with global scope inside function does not seem to work. The following code:
Code: | {function "f"}{$x=1 scope="global"}{/function}{f}{$x} |
outputs nothing. I would expect it to output "1". |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun Nov 25, 2012 3:57 pm Post subject: |
|
|
This is just an assignment it doen not output anything
Code: | {$x=1 scope="global"}{$x} |
|
|
Back to top |
|
ilyalyu Smarty Regular
Joined: 03 Nov 2009 Posts: 72
|
Posted: Sun Nov 25, 2012 9:40 pm Post subject: |
|
|
Should not {$x} code output this variable?
And should it contain "1" value, since I called function {f}, which assigned $x=1 in global scope? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Nov 26, 2012 8:12 pm Post subject: |
|
|
This bug is now fixed in the SVN trunk.
The fix will later be included in 3.1.13 |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|