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

pass by reference

 
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 -> Feature Requests
View previous topic :: View next topic  
Author Message
sam.7
Smarty n00b


Joined: 02 Aug 2005
Posts: 1

PostPosted: Tue Aug 02, 2005 5:27 pm    Post subject: pass by reference Reply with quote

Hi!
I really need variables beeing passed by reference when calling functions from within smarty.

For now I did it myself with this little workaround. But a solution that comes from smarty engine directly would of course be much more elegant.

this is my workaroud:
I changed this in the _compile_arg_list function (Smarty_Compiler.class.php)
original code:
Code:

                $arg_list[] = "'$arg_name' => $arg_value";


changed into:
Code:

                $arg_list[] = "'$arg_name' => ".($arg_value{0} == '$' ? "&":"")."$arg_value";


Thanks!
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 -> Feature Requests 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