From 99d1a445bdc3265f09b6a2fced80b007af76d945 Mon Sep 17 00:00:00 2001 From: EricGrivilers Date: Tue, 7 May 2013 16:09:21 +0300 Subject: [PATCH] Check if $cached is not a directory to avoid error on unlink --- Imagine/CachePathResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Imagine/CachePathResolver.php b/Imagine/CachePathResolver.php index ad1cfac..1c3fdbf 100644 --- a/Imagine/CachePathResolver.php +++ b/Imagine/CachePathResolver.php @@ -56,7 +56,7 @@ public function getBrowserPath($path, $filter, $absolute = false) $cached = realpath($this->webRoot.$path); - if (file_exists($cached) && filemtime($realPath) > filemtime($cached)) { + if (file_exists($cached) && !is_dir($cached) && filemtime($realPath) > filemtime($cached)) { unlink($cached); }