summaryrefslogtreecommitdiffstats
path: root/system/helpers/captcha_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers/captcha_helper.php')
-rw-r--r--system/helpers/captcha_helper.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index 642ff3a50..dcd6882c8 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -103,6 +103,18 @@ if ( ! function_exists('create_captcha'))
return FALSE;
}
+ if ($img_path === '' OR $img_url === '')
+ {
+ log_message('error', 'create_captcha(): $img_path and $img_url are required.');
+ return FALSE;
+ }
+
+ if ( ! is_dir($img_path) OR ! is_really_writable($img_path))
+ {
+ log_message('error', "create_captcha(): '{$img_path}' is not a dir, nor is it writable.");
+ return FALSE;
+ }
+
if ($img_url !== '' OR $img_path !== '')
{
if ($img_path === '' OR $img_url === '')