HomePhabricator

Bug 589: make random selection slightly more random. PHP's mt_rand() function…

Description

Bug 589: make random selection slightly more random. PHP's mt_rand() function has a maximum value of 2^31-1, which is small enough that duplicate values can occur due to the Birthday paradox, e.g. on the English Wikipedia. To fix this, add a wfRandom() function that calls mt_rand() twice to get the desired amount of randomness.

Details

Provenance
Wil MahanAuthored on
Parents
rMWa2f8c159a9d4: Detect and disallow > and < within external links. Fixes bug 289.
Branches
Unknown
Tags
Unknown
ChangeId
None