From 92ebfb65ac044f5c2e6d88fba137253854cf1b94 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 17 May 2012 12:49:24 +0300 Subject: Cleanup the core classes --- system/core/Exceptions.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'system/core/Exceptions.php') diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index 2e9f0c766..965a717ad 100755 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -65,6 +65,8 @@ class CI_Exceptions { /** * Initialize execption class + * + * @return void */ public function __construct() { @@ -87,7 +89,7 @@ class CI_Exceptions { */ public function log_exception($severity, $message, $filepath, $line) { - $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity]; + $severity = isset($this->levels[$severity]) ? $this->levels[$severity] : $severity; log_message('error', 'Severity: '.$severity.' --> '.$message. ' '.$filepath.' '.$line, TRUE); } @@ -127,14 +129,14 @@ class CI_Exceptions { * @param string the heading * @param string the message * @param string the template name - * @param int the status code + * @param int the status code * @return string */ public function show_error($heading, $message, $template = 'error_general', $status_code = 500) { set_status_header($status_code); - $message = '

'.implode('

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

'; + $message = '

'.implode('

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

'; if (ob_get_level() > $this->ob_level + 1) { @@ -160,7 +162,7 @@ class CI_Exceptions { */ public function show_php_error($severity, $message, $filepath, $line) { - $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity]; + $severity = isset($this->levels[$severity]) ? $this->levels[$severity] : $severity; $filepath = str_replace('\\', '/', $filepath); // For safety reasons we do not show the full file path @@ -175,7 +177,7 @@ class CI_Exceptions { ob_end_flush(); } ob_start(); - include(APPPATH.'errors/'.'error_php.php'); + include(APPPATH.'errors/error_php.php'); $buffer = ob_get_contents(); ob_end_clean(); echo $buffer; -- cgit v1.2.3-24-g4f1b