From: Fabien Potencier Date: Wed, 25 Jan 2012 15:02:48 +0000 (+0100) Subject: merged branch Tobion/patch-3 (PR #613) X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=f792b55141868e9108f8d496828a114d077a04c3;p=web%2Fkonrad%2Ftwig.git merged branch Tobion/patch-3 (PR #613) Commits ------- e81a9e2 Improved random function Discussion ---------- Improved random function - dealing with empty array (otherwise PHP warning is raised) - using array_rand() and thus saving the $keys variable --------------------------------------------------------------------------- by Tobion at 2012-01-25T12:41:32Z How about allowing `mt_rand ( int $min , int $max )` with optional parameters to be used when the $values ist not an array? This would solve use case #612 --- f792b55141868e9108f8d496828a114d077a04c3