diff options
Diffstat (limited to 'lib/cache/fileglobal.php')
-rw-r--r-- | lib/cache/fileglobal.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cache/fileglobal.php b/lib/cache/fileglobal.php index 6d01964e185..2fbd8ca3edb 100644 --- a/lib/cache/fileglobal.php +++ b/lib/cache/fileglobal.php @@ -69,7 +69,7 @@ class OC_Cache_FileGlobal{ $prefix = $this->fixKey($prefix); if($cache_dir and is_dir($cache_dir)) { $dh=opendir($cache_dir); - while($file=readdir($dh)) { + while (($file = readdir($dh)) !== false) { if($file!='.' and $file!='..' and ($prefix==='' || strpos($file, $prefix) === 0)) { unlink($cache_dir.$file); } @@ -88,7 +88,7 @@ class OC_Cache_FileGlobal{ $cache_dir = self::getCacheDir(); if($cache_dir and is_dir($cache_dir)) { $dh=opendir($cache_dir); - while($file=readdir($dh)) { + while (($file = readdir($dh)) !== false) { if($file!='.' and $file!='..') { $mtime = filemtime($cache_dir.$file); if ($mtime < $now) { |