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

View File

@@ -71,7 +71,11 @@ class File implements Driver, Sweeper {
*/
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)
{