Skip to content

Commit 0b9655e

Browse files
committed
Moving logic around to account for containing a FALSE value
1 parent bc9013e commit 0b9655e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
header('Location: /', true, 301);
1818
exit;
1919
}
20-
if (!ctype_alnum($requestedPage)) {
21-
$requestedPage = '404';
22-
}
2320
if (strlen($requestedPage) == 0) {
2421
$requestedPage = 'home';
2522
}
23+
if (!ctype_alnum($requestedPage)) {
24+
$requestedPage = '404';
25+
}
2626

2727
if (!(include 'resources/' . $requestedPage . '.html')) {
2828
header('HTTP/1.0 404 Not Found');

0 commit comments

Comments
 (0)