We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With this object:
class Obj { public function method(){ return array('a', 'b'); } }
and this template:
{% for a in obj.method %} {{ a }} {% if forloop.last %} test {% endif %} {% endfor %}
an exception is thrown:
exception 'ErrorException' with message 'call_user_func_array() expects parameter 2 to be array, object given' in /.../vendor/crodas/haanga/lib/Haanga/AST.php:534 Stack trace: #0 [internal function]: Slim\Slim::handleErrors(2, 'call_user_func_...', '/home/z/project...', 534, Array) #1 /.../vendor/crodas/haanga/lib/Haanga/AST.php(534): call_user_func_array(Array, Object(Haanga_AST)) #2 /.../vendor/crodas/haanga/lib/Haanga/Compiler.php(1150): hvar_ex(Object(Haanga_AST)) #3 /.../vendor/crodas/haanga/lib/Haanga/Compiler.php(483): Haanga_Compiler->generate_op_loop(Array, Object(Haanga_AST)) #4 /.../vendor/crodas/haanga/lib/Haanga/Compiler.php(296): Haanga_Compiler->generate_op_code(Array, Object(Haanga_AST)) [...]
It does not happen with forloop.first.
The text was updated successfully, but these errors were encountered:
dd3c96a
crodas
No branches or pull requests
With this object:
and this template:
an exception is thrown:
It does not happen with forloop.first.
The text was updated successfully, but these errors were encountered: