|
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 |
sam.7 Smarty n00b
Joined: 02 Aug 2005 Posts: 1
|
Posted: Tue Aug 02, 2005 5:27 pm Post subject: pass by reference |
|
|
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 |
|
|
|
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
|