summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorash <ashleybaker@gmail.com>2013-04-10 13:36:49 +0200
committerash <ashleybaker@gmail.com>2013-04-10 13:36:49 +0200
commit79dfac7d2b8628d114b02493aa842acd39d39ede (patch)
tree9aa25aedba8aeaba93c910e4949636923d907f15
parent1aa336d53b686c07291bda4f8e9dd8ac23614fc3 (diff)
typo change
Uses the same defaults as were hard coded in (8 chars in length, 0-9a-aA-Z). Small change in this file means less code elsewhere when generating random character strings for the captcha word. all existing code will work the same.
-rw-r--r--system/helpers/captcha_helper.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index fe6c340be..731b59e14 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -51,7 +51,7 @@ if ( ! function_exists('create_captcha'))
*/
function create_captcha($data = '', $img_path = '', $img_url = '', $font_path = '')
{
- $defaults = array('word' => '', 'img_path' => '', 'img_url' => '', 'img_width' => '150', 'img_height' => '30', 'font_path' => '', 'expiration' => 7200, 'captcha_word_length' => 8, 'character_pool_for_generted_word' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
+ $defaults = array('word' => '', 'img_path' => '', 'img_url' => '', 'img_width' => '150', 'img_height' => '30', 'font_path' => '', 'expiration' => 7200, 'captcha_word_length' => 8, 'character_pool_for_generated_word' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
foreach ($defaults as $key => $val)
{
@@ -107,9 +107,9 @@ if ( ! function_exists('create_captcha'))
if (empty($word))
{
$word = '';
- for ($i = 0, $mt_rand_max = strlen($character_pool_for_generted_word) - 1; $i < $captcha_word_length; $i++)
+ for ($i = 0, $mt_rand_max = strlen($character_pool_for_generated_word) - 1; $i < $captcha_word_length; $i++)
{
- $word .= $character_pool_for_generted_word[mt_rand(0, $mt_rand_max)];
+ $word .= $character_pool_for_generated_word[mt_rand(0, $mt_rand_max)];
}
}
elseif ( ! is_string($word))