summaryrefslogtreecommitdiffstats
path: root/system/core/Exceptions.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-10-05 23:00:08 +0200
committerAndrey Andreev <narf@devilix.net>2014-10-05 23:00:08 +0200
commitd444d445ed0458a352ecb9ff79ffd158677ee805 (patch)
treedcdbe4b38dbb343498b2ea2a37556cb358cd5720 /system/core/Exceptions.php
parent86d7eadf102c798f2aa70a86e86fd0f5050d9574 (diff)
config_item() to return NULL instead of FALSE for non-existing items
Close #3001 Close #3232 Related: #3244
Diffstat (limited to 'system/core/Exceptions.php')
-rw-r--r--system/core/Exceptions.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index cb4bc3cd6..49c2217c9 100644
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -145,9 +145,11 @@ class CI_Exceptions {
*/
public function show_error($heading, $message, $template = 'error_general', $status_code = 500)
{
- $templates_path = config_item('error_views_path')
- ? config_item('error_views_path')
- : VIEWPATH.'errors'.DIRECTORY_SEPARATOR;
+ $templates_path = config_item('error_views_path');
+ if (empty($templates_path))
+ {
+ $templates_path = VIEWPATH.'errors'.DIRECTORY_SEPARATOR;
+ }
if (is_cli())
{
@@ -185,9 +187,11 @@ class CI_Exceptions {
*/
public function show_php_error($severity, $message, $filepath, $line)
{
- $templates_path = config_item('error_views_path')
- ? config_item('error_views_path')
- : VIEWPATH.'errors'.DIRECTORY_SEPARATOR;
+ $templates_path = config_item('error_views_path');
+ if (empty($templates_path))
+ {
+ $templates_path = VIEWPATH.'errors'.DIRECTORY_SEPARATOR;
+ }
$severity = isset($this->levels[$severity]) ? $this->levels[$severity] : $severity;