Skip to content

Commit ede0692

Browse files
authored
Enhancement: Expose happy path (#406)
* Enhancement: Expose happy path * Fix: Require file with absolute path * Fix: Return null instead of false
1 parent 2b70836 commit ede0692

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.router.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33

44
$filename = $_SERVER["PATH_INFO"] ?? $_SERVER["SCRIPT_NAME"];
55

6-
if (file_exists($_SERVER["DOCUMENT_ROOT"] . $filename)) {
7-
/* This could be an image or whatever, so don't try to compress it */
8-
ini_set("zlib.output_compression", 0);
9-
return false;
6+
if (!file_exists($_SERVER["DOCUMENT_ROOT"] . $filename)) {
7+
require_once __DIR__ . '/error.php';
8+
9+
return;
1010
}
1111

12-
include_once "error.php";
12+
/* This could be an image or whatever, so don't try to compress it */
13+
ini_set("zlib.output_compression", 0);
14+
return null;

0 commit comments

Comments
 (0)