diff options
author | Alex Bilbie <alex@alexbilbie.com> | 2012-09-02 10:55:21 +0200 |
---|---|---|
committer | Alex Bilbie <alex@alexbilbie.com> | 2012-09-02 10:55:21 +0200 |
commit | c55708357b79899db984a058cab19d13be1e6ea9 (patch) | |
tree | 0690ec54da8cbff9d01d614c91e9678bc97af9b2 /system | |
parent | 9c0738be91c02f3e04912541894be6f9569bbf12 (diff) | |
parent | 07cdcf8bb2af1c18aa93ea3c39bee8dcdf7d047e (diff) |
Merge pull request #1728 from pickupman/bugfix-captcha_helper
Fix issue #1678
Diffstat (limited to 'system')
-rw-r--r-- | system/helpers/captcha_helper.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index a4383c9d3..57ef9e2fa 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -80,8 +80,7 @@ if ( ! function_exists('create_captcha')) $current_dir = @opendir($img_path); while ($filename = @readdir($current_dir)) { - if ($filename !== '.' && $filename !== '..' && $filename !== 'index.html' - && (str_replace('.jpg', '', $filename) + $expiration) < $now) + if (strpos($filename, ".jpg") !== FALSE && (str_replace('.jpg', '', $filename) + $expiration) < $now) { @unlink($img_path.$filename); } |