From: Christian Weiske Date: Tue, 8 Jan 2019 19:38:47 +0000 (+0100) Subject: Do not throw exception but send 400 X-Git-Url: https://git.cweiske.de/phinde.git/commitdiff_plain/d799ee3da63578c33bbdc74b6909e3924a6c80b4?hp=ea7a3af16218cfba55333e15d0eec856d595d59a Do not throw exception but send 400 --- diff --git a/www/index.php b/www/index.php index 7c4904b..c1acfdf 100644 --- a/www/index.php +++ b/www/index.php @@ -19,7 +19,9 @@ if (isset($_GET['page'])) { if ($page >= 100) { //Elasticsearch by default only allows 100 pages // we do not want exceptions in our logs - throw new Exception_Input('List page is too large'); + header('HTTP/1.0 400 Bad Request'); + echo "List page number is too large\n"; + exit(1); } }