aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 9b33a9ab62..fbc91b47b9 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1130,10 +1130,8 @@ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && $solved_c
$confirm_id = md5(unique_id($user->ip));
$seed = hexdec(substr(unique_id(), 4, 10));
- if ($seed > 0x7FFFFFFF)
- {
- $seed -= 0x7FFFFFFF;
- }
+ // compute $seed % 0x7fffffff
+ $seed -= 0x7fffffff * floor($seed / 0x7fffffff);
$sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'confirm_id' => (string) $confirm_id,