diff options
Diffstat (limited to 'thread.php')
-rw-r--r-- | thread.php | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -7,8 +7,16 @@ session_start(); $current = new Thread(); if (!isset($_GET['id']) || !filter_var($_GET['id'], FILTER_VALIDATE_INT)) { + http_response_code(404); + include_once 'templates/404.php'; + die(); } else { - $current->get_from_database($_GET['id'], $dbc); + $result = $current->get_from_database($_GET['id'], $dbc); + if ($result == 0) { + http_response_code(404); + include_once 'templates/404.php'; + die(); + } } ?> <!DOCTYPE html> |