Skip to content

Commit 7063ee8

Browse files
committed
404 on file not found
1 parent a86d53e commit 7063ee8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Resources/ResourceFactory.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ public static function create(DispatchResource $resource)
122122

123123
public static function fromFile($fullPath)
124124
{
125+
if(file_exists($fullPath))
126+
{
127+
return Response::create('File Not Found', 404);
128+
}
129+
125130
$resource = self::getExtensionResource(pathinfo($fullPath, PATHINFO_EXTENSION));
126131
if($resource instanceof AbstractResource)
127132
{

0 commit comments

Comments
 (0)