summaryrefslogtreecommitdiff
path: root/mod.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod.php')
-rw-r--r--mod.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/mod.php b/mod.php
index e822e6ba..6b3d17c3 100644
--- a/mod.php
+++ b/mod.php
@@ -166,7 +166,9 @@
if(!openBoard($boardName))
error(ERROR_NOBOARD);
- $page = index(empty($matches[2]) || $matches[2] == FILE_INDEX ? 1 : $matches[2], true);
+ if(!$page = index(empty($matches[2]) || $matches[2] == FILE_INDEX ? 1 : $matches[2], true)) {
+ error(ERROR_404);
+ }
$page['pages'] = getPages(true);
$page['mod'] = true;
@@ -204,7 +206,7 @@
header('Location: ?/' . sprintf(BOARD_PATH, $boardName) . FILE_INDEX, true, REDIRECT_HTTP);
} else {
- error("Page not found.");
+ error(ERROR_404);
}
}