mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
FloorDiv (//) should return integer value according to documentation
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user