Skip to content

Commit

Permalink
FloorDiv (//) should return integer value according to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sannis committed Sep 29, 2011
1 parent f96d8d8 commit 68ec644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Twig/Node/Expression/Binary/FloorDiv.php
Expand Up @@ -17,9 +17,9 @@ class Twig_Node_Expression_Binary_FloorDiv extends Twig_Node_Expression_Binary
*/ */
public function compile(Twig_Compiler $compiler) public function compile(Twig_Compiler $compiler)
{ {
$compiler->raw('floor('); $compiler->raw('intval(floor(');
parent::compile($compiler); parent::compile($compiler);
$compiler->raw(')'); $compiler->raw('))');
} }


public function operator(Twig_Compiler $compiler) public function operator(Twig_Compiler $compiler)
Expand Down

0 comments on commit 68ec644

Please sign in to comment.