diff options
author | vlakoff <vlakoff@gmail.com> | 2012-09-02 23:00:25 +0200 |
---|---|---|
committer | vlakoff <vlakoff@gmail.com> | 2012-09-03 00:22:41 +0200 |
commit | 5f385d0089229acf5ba317dca0c91457d14d797f (patch) | |
tree | e7e33684b173b6e3d8d6716dc567be21e21b4dbc /system/helpers | |
parent | 4e80d80ae6bda06b8c3bf2c041ab695b9d077340 (diff) |
Slightly robuster test
Also, single quotes per style conventions
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/captcha_helper.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 57ef9e2fa..3aac14db8 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -80,7 +80,7 @@ if ( ! function_exists('create_captcha')) $current_dir = @opendir($img_path); while ($filename = @readdir($current_dir)) { - if (strpos($filename, ".jpg") !== FALSE && (str_replace('.jpg', '', $filename) + $expiration) < $now) + if (substr($filename, -4) === '.jpg' && (str_replace('.jpg', '', $filename) + $expiration) < $now) { @unlink($img_path.$filename); } |