Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Error in {append}

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
oleg_king
Smarty n00b


Joined: 05 Jan 2013
Posts: 3

PostPosted: Sun Feb 03, 2013 9:42 pm    Post subject: Error in {append} Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Mon Feb 11, 2013 10:29 pm    Post subject: Reply with quote

I can't see your problem. Do you have a not working example?

Which version of Smarty did you use?
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP