|
|
@@ -580,7 +580,7 @@ class Zend_Captcha_Image extends Zend_Captcha_Word
|
|
|
$suffixLength = strlen($this->_suffix);
|
|
|
foreach (new DirectoryIterator($imgdir) as $file) {
|
|
|
if (!$file->isDot() && !$file->isDir()) {
|
|
|
- if ($file->getMTime() < $expire) {
|
|
|
+ if (file_exists($file->getPathname()) && $file->getMTime() < $expire) {
|
|
|
// only deletes files ending with $this->_suffix
|
|
|
if (substr($file->getFilename(), -($suffixLength)) == $this->_suffix) {
|
|
|
unlink($file->getPathname());
|