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

This commit is contained in:
Oleg Efimov
2011-09-29 13:24:03 +04:00
parent f96d8d8219
commit 68ec644936
+2 -2
View File
@@ -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)