summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorAlex Bilbie <alex@alexbilbie.com>2012-09-07 01:22:36 +0200
committerAlex Bilbie <alex@alexbilbie.com>2012-09-07 01:22:36 +0200
commitcbc768d8beb777879f5d5517cdaefbfd903450c3 (patch)
treee24406fb208bf266eebda249f3e008c6d5a007ef /system/helpers
parent3f3f135ed5b47fd87a59d31fb3d1a4c773dcc3b3 (diff)
parent5f385d0089229acf5ba317dca0c91457d14d797f (diff)
Merge pull request #1760 from vlakoff/develop-2
Better old captcha image test
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/captcha_helper.php2
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);
}