|
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 |
oleg_king Smarty n00b
Joined: 05 Jan 2013 Posts: 3
|
Posted: Sun Feb 03, 2013 9:42 pm Post subject: Error in {append} |
|
|
Hi!
I found some strange behavior of smarty. When I try to append array with {append} or {$array[] = 1} it re-creates existing array with only assigned item in it. Subsequental appends works ok.
As I understand, append compile function assigns $_params['smarty_internal_index'] (all time, when using 'index' or not) and calls assign() compile function.
In assign compile function it check if (isset($parameter['smarty_internal_index'])) and re-creates array as empty instead of adding one more element to it.
What should I do to make it work? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Feb 11, 2013 10:29 pm Post subject: |
|
|
I can't see your problem. Do you have a not working example?
Which version of Smarty did you use? |
|
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
|