|
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 |
eposjk Smarty Rookie
Joined: 07 Oct 2009 Posts: 13
|
Posted: Wed Oct 07, 2009 7:31 pm Post subject: Custom Plugin receives string "Array" instead of r |
|
|
Hello!
I have a custom plugin: Code: | {myinput dropdown="$arrayofoptions"} |
$arrayofoptions contains an array.
Inside the PHP plugin code:
For Smarty 2, $params['dropdown'] contains the array. --> correct.
For Smarty 3, $params['dropdown'] contains the string "Array".
When I call the plugin without quotes, it also works with Smarty 3:
Code: | {myinput dropdown=$arrayofoptions} |
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Oct 07, 2009 7:49 pm Post subject: |
|
|
If you want to pass an array
{myinput dropdown=$arrayofoptions}
is the correct syntax.
It's a bug that Smarty2 does accept {myinput dropdown="$arrayofoptions"} |
|
Back to top |
|
manuel_ Smarty n00b
Joined: 28 Oct 2013 Posts: 1
|
Posted: Tue Oct 29, 2013 9:52 am Post subject: |
|
|
Thx U.Tews! Even though it's now 4 years later, your post helped me out!
Greetings,
Manuel |
|
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
|