summaryrefslogtreecommitdiffstats
path: root/system/core/Exceptions.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-05-17 14:55:08 +0200
committerTimothy Warren <tim@timshomepage.net>2012-05-17 14:55:08 +0200
commit55450deee2acbdf112f5c206673b3215ca10dfcb (patch)
tree09fa0f810524ed353f868194059f336c6f26eb50 /system/core/Exceptions.php
parent351c2e1b0d3fdca80a5483d708d7c71084226e68 (diff)
parente30b3f7afafa2c016cf78cc8bb8a457c2dbcda8c (diff)
merge upstream
Diffstat (limited to 'system/core/Exceptions.php')
-rwxr-xr-xsystem/core/Exceptions.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index f9618044e..8c32085fe 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 = '<p>'.implode('</p><p>', ( ! is_array($message)) ? array($message) : $message).'</p>';
+ $message = '<p>'.implode('</p><p>', is_array($message) ? $message : array($message)).'</p>';
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