diff options
author | George Petculescu <gxgpet@gmail.com> | 2019-09-08 14:58:36 +0200 |
---|---|---|
committer | George Petculescu <gxgpet@gmail.com> | 2019-09-08 14:58:36 +0200 |
commit | 98baf38d5384b316fc443f764d01041c8912d31e (patch) | |
tree | 4f5474fab4a59f4f4d0306ea5b8744001ac37155 /system/helpers/captcha_helper.php | |
parent | a66c71e131c2a7f05d57b03c8619d9bdd542b5bf (diff) |
improve create_captcha logging
Diffstat (limited to 'system/helpers/captcha_helper.php')
-rw-r--r-- | system/helpers/captcha_helper.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 94365adb5..ca9b86540 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -99,13 +99,19 @@ if ( ! function_exists('create_captcha')) if ( ! extension_loaded('gd')) { + log_message('error', 'create_captcha(): GD extension is not loaded.'); return FALSE; } if ($img_url !== '' OR $img_path !== '') { - if ($img_path === '' OR $img_url === '' OR ! is_dir($img_path) OR ! is_really_writable($img_path)) + if ($img_path === '' OR $img_url === '') { + log_message('error', 'create_captcha(): "img_path" and "img_url" are required.'); + return FALSE; + } elseif ( ! is_dir($img_path) OR ! is_really_writable($img_path)) + { + log_message('error', "create_captcha(): '$img_path' is not a dir, nor it's writable."); return FALSE; } |