summaryrefslogtreecommitdiffstats
path: root/system/core/Exceptions.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-07 20:56:59 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-07 20:56:59 +0200
commitcd221aba73cb7a117c70ca237f0ee9dc14f80cf1 (patch)
tree39db53d645226c212eb697494320eef6302544a0 /system/core/Exceptions.php
parent1fcce9667fe8d1925a36549e22124411f5828230 (diff)
parent6c776538c4e8f1b932d5ec7431c1c8de8a5642a6 (diff)
Merge upstream branch
Diffstat (limited to 'system/core/Exceptions.php')
-rwxr-xr-xsystem/core/Exceptions.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index 2e9f0c766..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,21 +129,21 @@ 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)
{
ob_end_flush();
}
ob_start();
- include(APPPATH.'errors/'.$template.'.php');
+ include(APPPATH.'views/errors/'.$template.'.php');
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
@@ -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.'views/errors/error_php.php');
$buffer = ob_get_contents();
ob_end_clean();
echo $buffer;