merged branch Tobion/patch-3 (PR #613)
authorFabien Potencier <fabien.potencier@gmail.com>
Wed, 25 Jan 2012 15:02:48 +0000 (16:02 +0100)
committerFabien Potencier <fabien.potencier@gmail.com>
Wed, 25 Jan 2012 15:02:48 +0000 (16:02 +0100)
commitf792b55141868e9108f8d496828a114d077a04c3
tree129f36c51c823452b31a30d2abf86d5b88f77bee
parentdb9179c77d112bb0e1bf2944848915e67e5ca53b
parente81a9e2e71f119bee2038a6dd34d006fb9b426ce
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