projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
f96d8d8
)
FloorDiv (//) should return integer value according to documentation
author
Oleg Efimov
<efimovov@gmail.com>
Thu, 29 Sep 2011 09:24:03 +0000 (13:24 +0400)
committer
Oleg Efimov
<efimovov@gmail.com>
Thu, 29 Sep 2011 09:24:03 +0000 (13:24 +0400)
lib/Twig/Node/Expression/Binary/FloorDiv.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Node/Expression/Binary/FloorDiv.php
b/lib/Twig/Node/Expression/Binary/FloorDiv.php
index
e86b1ea
..
7fbd055
100644
(file)
--- a/
lib/Twig/Node/Expression/Binary/FloorDiv.php
+++ b/
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)