diff options
author | Andrey Andreev <narf@devilix.net> | 2020-01-28 20:16:56 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2020-01-28 20:16:56 +0100 |
commit | 2b96e73d85365fb05a56e7464cdb341fd5a9d7b8 (patch) | |
tree | 7e6a7d5805e1a94abe92f7db43727da739877aed /system/helpers | |
parent | ddfe81730f43b20092383165911c5b1c92d4e5f3 (diff) | |
parent | ced499f7ad90ff8bb6bf0faa2e24a1593204de9a (diff) |
Merge branch '3.1-stable' into develop
Conflicts resolved:
.travis.yml
system/database/DB_query_builder.php
system/helpers/captcha_helper.php
system/libraries/Cache/drivers/Cache_redis.php
system/libraries/Zip.php
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/captcha_helper.php | 12 |
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 === '') |