1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 23:11:45 +02:00
- replaced array_rand($array) with mt_rand(0, sizeof($array) - 1) as array_rand did not take my seed


git-svn-id: file:///svn/phpbb/trunk@6705 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M
2006-12-03 17:36:59 +00:00
parent 1f7224c601
commit ec80eb74aa
15 changed files with 65 additions and 15 deletions

View File

@@ -30,15 +30,14 @@ class captcha
}
/**
* Create the image containing $code
* Create the image containing $code with a seed of $seed
*/
function execute($code)
function execute($code, $seed)
{
$img_height = $this->height - 10;
$img_width = 0;
list($usec, $sec) = explode(' ', microtime());
mt_srand($sec * $usec);
mt_srand($seed);
$char_widths = $hold_chars = array();
$code_len = strlen($code);