1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00

Merge pull request #402 from gms8994/patch-1

Checks to see if file_exists *and* it's an actual file.
This commit is contained in:
Adam Wathan
2017-08-09 08:49:02 -04:00
committed by GitHub

View File

@@ -26,7 +26,8 @@ public function serves($sitePath, $siteName, $uri)
*/
public function isStaticFile($sitePath, $siteName, $uri)
{
if (file_exists($staticFilePath = $sitePath.'/public'.$uri)) {
if (file_exists($staticFilePath = $sitePath.'/public'.$uri)
&& is_file($staticFilePath)) {
return $staticFilePath;
}