diff --git a/Imagine/CachePathResolver.php b/Imagine/CachePathResolver.php index a05070e..de8c663 100644 --- a/Imagine/CachePathResolver.php +++ b/Imagine/CachePathResolver.php @@ -61,6 +61,9 @@ public function getBrowserPath($path, $filter, $absolute = false) ), $absolute) ); + // removing any files in the path, eg app_dev.php + $path = preg_replace('/\/[^\/\.]*\.php\//', '/', $path); + $cached = realpath($this->webRoot.$path); if (file_exists($cached) && !is_dir($cached) && filemtime($realPath) > filemtime($cached)) {