This commit is contained in:
Fabien Potencier
2012-01-26 15:06:15 +01:00
parent 3bec772bea
commit bf61cc5344
+1 -1
View File
@@ -299,7 +299,7 @@ function twig_random($values = null)
}
if (is_int($values) || is_float($values)) {
return ($values < 0) ? mt_rand($values, 0) : mt_rand(0, $values);
return $values < 0 ? mt_rand($values, 0) : mt_rand(0, $values);
}
if ($values instanceof Traversable) {