aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorCamil Staps2015-02-07 20:47:52 +0100
committerCamil Staps2015-02-07 20:47:52 +0100
commit560e6741091b35394a5213e2843f4a7f9cc935d0 (patch)
tree912947bca23e1870c35579f1843364a1e85469c2 /index.php
parentUpdated information about installing folders (diff)
converted indent to spaces; improved readability; removed obsolete todos
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.php b/index.php
index 238b72e..a27f054 100644
--- a/index.php
+++ b/index.php
@@ -51,6 +51,7 @@ $pages = array(
'/assignments/edit' => './include/assignments-edit.php',
'/about' => './include/about.php'
);
+
$_page = null;
foreach ($pages as $uri => $path) {
if ($_request == $uri && file_exists($path)) {
@@ -59,6 +60,7 @@ foreach ($pages as $uri => $path) {
break;
}
}
+
if ($_page === null) {
$_page = '/404';
http_response_code(404);