Commit 471b7aaa by Taylor Otwell

fix glob problem in file cache driver.

parent 04f21380
...@@ -71,7 +71,11 @@ class File implements Driver, Sweeper { ...@@ -71,7 +71,11 @@ class File implements Driver, Sweeper {
*/ */
public function sweep($expiration) public function sweep($expiration)
{ {
foreach (glob($this->path.'*') as $file) $files = glob($this->path.'*');
if ($files === false) return;
foreach ($files as $file)
{ {
if (filetype($file) == 'file' and filemtime($file) < $expiration) if (filetype($file) == 'file' and filemtime($file) < $expiration)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment