diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index e6d973c7f3..fb5c86333d 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -219,10 +219,13 @@ function bbencode_second_pass($text, $uid) } // bbencode_second_pass() +// Need to initialize the random numbers only ONCE +mt_srand( (double) microtime() * 1000000); + function make_bbcode_uid() { // Unique ID for this message.. - $uid = md5(uniqid(rand())); + $uid = md5(mt_rand()); $uid = substr($uid, 0, BBCODE_UID_LEN); return $uid; @@ -694,4 +697,4 @@ function bbcode_array_pop(&$stack) return($return_val); } -?> \ No newline at end of file +?>