aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/captcha_gd.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-06-05 03:22:40 +0200
committerNils Adermann <naderman@naderman.de>2011-06-05 03:22:40 +0200
commitb55bfb459e70bd636033b32d65e3436a006acac7 (patch)
treeee99e5b714c28a55344f73f3b5fc68a5a0ec5d7b /phpBB/includes/captcha/captcha_gd.php
parent0a1e7ca02b22bc65d8343df2e571caa6bfef2aac (diff)
parent893d0ae96f4fba26a10b909d39abe952601bca41 (diff)
downloadforums-b55bfb459e70bd636033b32d65e3436a006acac7.tar
forums-b55bfb459e70bd636033b32d65e3436a006acac7.tar.gz
forums-b55bfb459e70bd636033b32d65e3436a006acac7.tar.bz2
forums-b55bfb459e70bd636033b32d65e3436a006acac7.tar.xz
forums-b55bfb459e70bd636033b32d65e3436a006acac7.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10042] GD CAPTCHA: Call phpbb_mt_rand() where required. [ticket/10042] GD CAPTCHA: Round offset to the next pixel. [ticket/10042] Add mt_rand() wrapper which allows swapping $min and $max.
Diffstat (limited to 'phpBB/includes/captcha/captcha_gd.php')
-rw-r--r--phpBB/includes/captcha/captcha_gd.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php
index 15f34aa58f..5e61d6a47b 100644
--- a/phpBB/includes/captcha/captcha_gd.php
+++ b/phpBB/includes/captcha/captcha_gd.php
@@ -77,7 +77,7 @@ class captcha
{
$denom = ($code_len - $i);
$denom = max(1.3, $denom);
- $offset[$i] = mt_rand(0, (1.5 * $width_avail) / $denom);
+ $offset[$i] = phpbb_mt_rand(0, (int) round((1.5 * $width_avail) / $denom));
$width_avail -= $offset[$i];
}