Closed Kekec852 closed 11 years ago
Not a bug. From the docs: "Fat-Free will replace the token with Array because it converts the token to a string, in much the same way that PHP displays the string Array when you try to echo a variable containing such type".
I'm little confused.
So if i use:
F3::set("test", User::get_users());//from example
And then use it in:
<select name="user" class="smaller">
<option value="-1">Select ...</option>
<F3:repeat group="{{@test}}" value="{{@item}}">
<option value="{{@item.UID}}">{{@item.username}}</option>
</F3:repeat>
</select>
Will work as array but not if i use it directly in template?
<select name="user" class="smaller">
<option value="-1">Select ...</option>
<F3:repeat group="{{User::get_users()}}" value="{{@item}}">
<option value="{{@item.UID}}">{{@item.username}}</option>
</F3:repeat>
</select>
Fixed in 3.0.
I get a error if i try to use static function that returns an array like this:
And than in template:
I get an error like this: