Permalink
Browse files

merged branch Sannis/patch-1 (PR #455)

Commits
-------

68ec644 FloorDiv (//) should return integer value according to documentation

Discussion
----------

FloorDiv (//) should return integer value according to documentation
  • Loading branch information...
2 parents f96d8d8 + 68ec644 commit d20f970d9a8c27d5f1d00e4807f32015032f6b5a @fabpot committed Sep 29, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Twig/Node/Expression/Binary/FloorDiv.php
@@ -17,9 +17,9 @@ class Twig_Node_Expression_Binary_FloorDiv extends Twig_Node_Expression_Binary
*/
public function compile(Twig_Compiler $compiler)
{
- $compiler->raw('floor(');
+ $compiler->raw('intval(floor(');
parent::compile($compiler);
- $compiler->raw(')');
+ $compiler->raw('))');
}
public function operator(Twig_Compiler $compiler)

0 comments on commit d20f970

Please sign in to comment.