aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cache/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cache/file.php')
-rw-r--r--lib/cache/file.php4
1 files changed, 2 insertions, 2 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) {