summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Exceptions.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index 041869641..5bcb7c1c5 100644
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -145,6 +145,10 @@ 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;
+
if (is_cli())
{
$message = "\t".(is_array($message) ? implode("\n\t", $message) : $message);
@@ -162,7 +166,7 @@ class CI_Exceptions {
ob_end_flush();
}
ob_start();
- include(VIEWPATH.'errors'.DIRECTORY_SEPARATOR.$template.'.php');
+ include($templates_path.$template.'.php');
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
@@ -181,6 +185,10 @@ 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;
+
$severity = isset($this->levels[$severity]) ? $this->levels[$severity] : $severity;
// For safety reasons we don't show the full file path in non-CLI requests
@@ -205,7 +213,7 @@ class CI_Exceptions {
ob_end_flush();
}
ob_start();
- include(VIEWPATH.'errors'.DIRECTORY_SEPARATOR.$template.'.php');
+ include($templates_path.$template.'.php');
$buffer = ob_get_contents();
ob_end_clean();
echo $buffer;