fix glob problem in file cache driver.

This commit is contained in:
Taylor Otwell 2012-01-17 09:23:11 -06:00
parent 04f21380ca
commit 471b7aaa81
1 changed files with 5 additions and 1 deletions

View File

@ -71,7 +71,11 @@ public function delete($id)
*/ */
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)
{ {