From 2425af76c5544d02cedac72d8706049c87b736a9 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 4 Jan 2012 18:33:37 +0100 Subject: [PATCH] Removed manual random seed initialization Closes #286 --- .../install/files/lib/util/MathUtil.class.php | 18 ------------------ 1 file changed, 18 deletions(-) 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()); - } - } } -- 2.20.1