summaryrefslogtreecommitdiffstats
path: root/system/helpers/captcha_helper.php
diff options
context:
space:
mode:
authorIban Eguia <admin@razican.com>2012-06-08 23:01:31 +0200
committerIban Eguia <admin@razican.com>2012-06-08 23:01:31 +0200
commit895e98c0f04f1087e8900ce8423ad3210a423770 (patch)
tree6adfe487293df38807084599f1f04157b5531e54 /system/helpers/captcha_helper.php
parent0ed4f63f4268b0c98f549ffd711702fd45a761d0 (diff)
parenta593c69de4ea125c096f611c78dd0839489e7ebd (diff)
Merge remote-tracking branch 'upstream/develop' into new_date
Diffstat (limited to 'system/helpers/captcha_helper.php')
-rw-r--r--system/helpers/captcha_helper.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index bdbc62097..4676b2a65 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -37,17 +37,17 @@
// ------------------------------------------------------------------------
-/**
- * Create CAPTCHA
- *
- * @param array array of data for the CAPTCHA
- * @param string path to create the image in
- * @param string URL to the CAPTCHA image folder
- * @param string server path to font
- * @return string
- */
if ( ! function_exists('create_captcha'))
{
+ /**
+ * Create CAPTCHA
+ *
+ * @param array array of data for the CAPTCHA
+ * @param string path to create the image in
+ * @param string URL to the CAPTCHA image folder
+ * @param string server path to font
+ * @return string
+ */
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);
@@ -64,7 +64,7 @@ if ( ! function_exists('create_captcha'))
}
}
- if ($img_path == '' OR $img_url == ''
+ if ($img_path === '' OR $img_url === ''
OR ! @is_dir($img_path) OR ! is_writeable($img_path)
OR ! extension_loaded('gd'))
{
@@ -93,7 +93,7 @@ if ( ! function_exists('create_captcha'))
// Do we have a "word" yet?
// -----------------------------------
- if ($word == '')
+ if ($word === '')
{
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$word = '';
@@ -156,7 +156,7 @@ if ( ! function_exists('create_captcha'))
// Write the text
// -----------------------------------
- $use_font = ($font_path != '' && file_exists($font_path) && function_exists('imagettftext'));
+ $use_font = ($font_path !== '' && file_exists($font_path) && function_exists('imagettftext'));
if ($use_font === FALSE)
{
$font_size = 5;