diff options
author | Derek Allard <derek.allard@ellislab.com> | 2010-08-05 16:08:33 +0200 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2010-08-05 16:08:33 +0200 |
commit | 2ddc9496e9403a59a87b644d1c2b9a106b773e46 (patch) | |
tree | 5762dccce2cc5c308cbc8224f09442729cac4bc3 /system/core/Exceptions.php | |
parent | 073e15cea53c53b73a215a86a22aabe4d5db2549 (diff) |
Added an optional second parameter to <kbd>show_404()</kbd> to disable logging.
Diffstat (limited to 'system/core/Exceptions.php')
-rw-r--r-- | system/core/Exceptions.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index 503015dfd..419ea2b61 100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -88,12 +88,17 @@ class CI_Exceptions { * @param string * @return string */ - function show_404($page = '') + function show_404($page = '', $log_error = TRUE) { $heading = "404 Page Not Found"; $message = "The page you requested was not found."; - log_message('error', '404 Page Not Found --> '.$page); + // By default we log this, but allow a dev to skip it + if ($log_error) + { + log_message('error', '404 Page Not Found --> '.$page); + } + echo $this->show_error($heading, $message, 'error_404', 404); exit; } |