X-Git-Url: http://git.onelab.eu/?p=www-register-wizard.git;a=blobdiff_plain;f=libraries%2FExceptions.php;h=9c655a17460f8b7d675256c5e4ad63f613bce03e;hp=541fd1a1a74afe367be057229df88b6e411b9a5b;hb=47598daa8c32dbbd72db83dc33f2ce91b3f6f7b0;hpb=4afb2fe256f094a1caf6bff14f51c6a88938cc9f diff --git a/libraries/Exceptions.php b/libraries/Exceptions.php index 541fd1a..9c655a1 100644 --- a/libraries/Exceptions.php +++ b/libraries/Exceptions.php @@ -6,7 +6,7 @@ * * @package CodeIgniter * @author ExpressionEngine Dev Team - * @copyright Copyright (c) 2008, EllisLab, Inc. + * @copyright Copyright (c) 2008 - 2009, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 @@ -94,7 +94,7 @@ class CI_Exceptions { $message = "The page you requested was not found."; log_message('error', '404 Page Not Found --> '.$page); - echo $this->show_error($heading, $message, 'error_404'); + echo $this->show_error($heading, $message, 'error_404', 404); exit; } @@ -113,8 +113,10 @@ class CI_Exceptions { * @param string the template name * @return string */ - function show_error($heading, $message, $template = 'error_general') + function show_error($heading, $message, $template = 'error_general', $status_code = 500) { + set_status_header($status_code); + $message = '

'.implode('

', ( ! is_array($message)) ? array($message) : $message).'

'; if (ob_get_level() > $this->ob_level + 1)