From 92c2e450b09395fb9b02c0331a6e8c5d75ad0884 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 8 Jul 2003 11:15:26 +0000 Subject: [PATCH] Fix for floating point random value in non-english locales which may use comma as decimal separator --- includes/Article.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Article.php b/includes/Article.php index c75d62e6c4..a45264e64f 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -611,7 +611,7 @@ name=\"wpSummary\" maxlength=200 size=60>
$now = wfTimestampNow(); $won = wfInvertTimestamp( $now ); wfSeedRandom(); - $rand = mt_rand() / mt_getrandmax(); + $rand = number_format( mt_rand() / mt_getrandmax(), 12, ".", "" ); $sql = "INSERT INTO cur (cur_namespace,cur_title,cur_text," . "cur_comment,cur_user,cur_timestamp,cur_minor_edit,cur_counter," . "cur_restrictions,cur_user_text,cur_is_redirect," . -- 2.20.1