diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-09-03 15:49:46 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-09-03 15:49:46 +0200 |
commit | 26e2f14fb02bc6dd3df3e516f57a51b628a2e4c2 (patch) | |
tree | 8d6c7b87844b1319adab7f25d7ef5c7c51e0e513 /application/errors/error_general.php | |
parent | fbd587a62dc1d84e4ebf3917ecdb86270ea8a48d (diff) | |
parent | 69e0cba93445496e7b045b54ecefe8243276fd50 (diff) |
Merge branch 'working'
Diffstat (limited to 'application/errors/error_general.php')
-rwxr-xr-x | application/errors/error_general.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/application/errors/error_general.php b/application/errors/error_general.php index da3999cbd..fc3d3f607 100755 --- a/application/errors/error_general.php +++ b/application/errors/error_general.php @@ -9,6 +9,16 @@ if (class_exists("CI_Controller") && !isset($GLOBALS["is_error_page"])) { $CI->load->helper("filebin"); $CI->load->helper("url"); + if (request_type() == "json") { + $array = array( + "status" => "error", + "message" => strip_tags($message), + ); + header('Content-type: application/json'); + echo json_encode($array); + exit(); + } + if (is_cli_client()) { $message = strip_tags($message); echo "$heading: $message\n"; |