Skip to content

Commit 03c7005

Browse files
committed
Fix bug caused by missing error case.
1 parent e3358fd commit 03c7005

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Server.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,11 @@ private function handleReadRequest(Response $response, string $path, $contents,
570570
if ($contents !== false) {
571571
$response->getBody()->write($contents);
572572
$response = $response->withHeader("Content-type", $mimetype)->withStatus(200);
573+
} else {
574+
/*/ The file does exist in another format and no link-metadata is present /*/
575+
$message = vsprintf(self::ERROR_PATH_DOES_NOT_EXIST, [$path]);
576+
$response->getBody()->write($message);
577+
$response = $response->withStatus(404);
573578
}
574579
} else {
575580
/*/ The file does exist in another format and no link-metadata is present /*/

0 commit comments

Comments
 (0)