diff options
Diffstat (limited to 'application/errors/error_general.php')
-rw-r--r-- | application/errors/error_general.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/application/errors/error_general.php b/application/errors/error_general.php index 6c67fa33f..be495e4f6 100644 --- a/application/errors/error_general.php +++ b/application/errors/error_general.php @@ -2,14 +2,21 @@ // fancy error page only works if we can load helpers if (class_exists("CI_Controller") && !isset($GLOBALS["is_error_page"])) { - $title = "Error"; + if (!isset($title)) { + $title = "Error"; + } $GLOBALS["is_error_page"] = true; $CI =& get_instance(); $CI->load->helper("filebin"); $CI->load->helper("url"); + if ($CI->input->is_cli_request()) { + is_cli_client(true); + } + if (static_storage("response_type") == "json") { + $message = str_replace("</p>", "</p>\n", $message); $array = array( "status" => "error", "message" => strip_tags($message), @@ -20,6 +27,7 @@ if (class_exists("CI_Controller") && !isset($GLOBALS["is_error_page"])) { } if (is_cli_client()) { + $message = str_replace("</p>", "</p>\n", $message); $message = strip_tags($message); echo "$heading: $message\n"; exit(); |