summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-09-27 19:05:03 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-11-01 17:29:04 +0100
commit7c3c04d55b3808d9e90eaaa0ba51b3e9cd682823 (patch)
tree9ef734c2cbff3cc86f2ad076297f25d24a4edaa9
parent2612aa7719fa7811333eea650fd4af7edb599c5e (diff)
Drop plain text error handling
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/errors/error_general.php2
-rw-r--r--public_html/index.php14
2 files changed, 6 insertions, 10 deletions
diff --git a/application/errors/error_general.php b/application/errors/error_general.php
index e372cfa7f..7dac0c529 100644
--- a/application/errors/error_general.php
+++ b/application/errors/error_general.php
@@ -11,7 +11,7 @@ if (class_exists("CI_Controller") && !isset($GLOBALS["is_error_page"])) {
$CI->load->helper("filebin");
$CI->load->helper("url");
- if (is_cli_client() || $CI->input->is_cli_request()) {
+ if ($CI->input->is_cli_request()) {
$message = str_replace("</p>", "</p>\n", $message);
$message = strip_tags($message);
echo "$heading: $message\n";
diff --git a/public_html/index.php b/public_html/index.php
index 3c531e64c..6d81b244c 100644
--- a/public_html/index.php
+++ b/public_html/index.php
@@ -253,16 +253,12 @@ if ($testname) {
try {
require_once BASEPATH.'core/CodeIgniter.php';
} catch (\exceptions\NotAuthenticatedException $e) {
- if (is_cli_client()) {
- show_error(nl2br(htmlspecialchars($e->__toString())), $e->get_http_error_code());
- } else {
- $CI =& get_instance();
- $redirect_uri = $CI->uri->uri_string();
- if (isset($CI->data["redirect_uri"])) {
- $redirect_uri = $CI->data["redirect_uri"];
- }
- redirect("user/login?redirect_uri=".$redirect_uri);
+ $CI =& get_instance();
+ $redirect_uri = $CI->uri->uri_string();
+ if (isset($CI->data["redirect_uri"])) {
+ $redirect_uri = $CI->data["redirect_uri"];
}
+ redirect("user/login?redirect_uri=".$redirect_uri);
} catch (\exceptions\PublicApiException $e) {
show_error(nl2br(htmlspecialchars($e->__toString())), $e->get_http_error_code());
} finally {