From 7c3c04d55b3808d9e90eaaa0ba51b3e9cd682823 Mon Sep 17 00:00:00 2001
From: Florian Pritz <bluewind@xinu.at>
Date: Tue, 27 Sep 2016 19:05:03 +0200
Subject: Drop plain text error handling

Signed-off-by: Florian Pritz <bluewind@xinu.at>
---
 public_html/index.php | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

(limited to 'public_html/index.php')

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 {
-- 
cgit v1.2.3-24-g4f1b