From: Alexander Ebert Date: Wed, 4 Jan 2012 17:33:37 +0000 (+0100) Subject: Removed manual random seed initialization X-Git-Tag: 2.0.0_Beta_1~1454 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2425af76c5544d02cedac72d8706049c87b736a9;p=GitHub%2FWoltLab%2FWCF.git Removed manual random seed initialization Closes #286 --- diff --git a/wcfsetup/install/files/lib/util/MathUtil.class.php b/wcfsetup/install/files/lib/util/MathUtil.class.php index b44b9ce329..67f85f097f 100644 --- a/wcfsetup/install/files/lib/util/MathUtil.class.php +++ b/wcfsetup/install/files/lib/util/MathUtil.class.php @@ -20,25 +20,7 @@ class MathUtil { * @return integer */ public static function getRandomValue($min = null, $max = null) { - // set seed - mt_srand(self::getRandomSeed()); - // generate random value return (($min !== null && $max !== null) ? mt_rand($min, $max) : mt_rand()); } - - /** - * Generates a seed for the random value generator. - * - * @return integer - */ - public static function getRandomSeed() { - @clearstatcache(); - if (($stat = @stat(__FILE__)) !== false) { - return crc32(microtime() . implode(microtime(), $stat)); - } - else { - return crc32(microtime()); - } - } }