Skip to content

Commit

Permalink
Merge pull request #146 from caravane/develop
Browse files Browse the repository at this point in the history
Check if $cached is not a directory to avoid error on unlink
  • Loading branch information
avalanche123 committed Aug 28, 2014
2 parents 92142e6 + 99d1a44 commit fce1cce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Imagine/CachePathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit fce1cce

Please sign in to comment.