diff --git a/library/think/cache/driver/File.php b/library/think/cache/driver/File.php index 95021e05..52243a47 100644 --- a/library/think/cache/driver/File.php +++ b/library/think/cache/driver/File.php @@ -226,7 +226,10 @@ class File extends Driver $files = (array) glob($this->options['path'] . ($this->options['prefix'] ? $this->options['prefix'] . DS : '') . '*'); foreach ($files as $path) { if (is_dir($path)) { - array_map('unlink', glob($path . '/*.php')); + $matches = glob($path . '/*.php'); + if (is_array($matches)) { + array_map('unlink', $matches); + } rmdir($path); } else { unlink($path);