diff options
Diffstat (limited to 'lib/cache')
-rw-r--r-- | lib/cache/file.php | 4 | ||||
-rw-r--r-- | lib/cache/fileglobal.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/cache/file.php b/lib/cache/file.php index ba3dedaf8f3..9fee6034a71 100644 --- a/lib/cache/file.php +++ b/lib/cache/file.php @@ -80,7 +80,7 @@ class OC_Cache_File{ $storage = $this->getStorage(); if($storage and $storage->is_dir('/')) { $dh=$storage->opendir('/'); - while($file=readdir($dh)) { + while (($file = readdir($dh)) !== false) { if($file!='.' and $file!='..' and ($prefix==='' || strpos($file, $prefix) === 0)) { $storage->unlink('/'.$file); } @@ -94,7 +94,7 @@ class OC_Cache_File{ if($storage and $storage->is_dir('/')) { $now = time(); $dh=$storage->opendir('/'); - while($file=readdir($dh)) { + while (($file = readdir($dh)) !== false) { if($file!='.' and $file!='..') { $mtime = $storage->filemtime('/'.$file); if ($mtime < $now) { 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) { |