From be7085fd681a4e4941124e6a1b9f60c502dd491f Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Fri, 7 Aug 2015 09:39:06 +0000 Subject: [PATCH] route : catch the http errors from PHP (with error code 0) as "Internal Server Error" (error code 500) git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2220 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route.php b/route.php index 3f5833e..5d6acbe 100644 --- a/route.php +++ b/route.php @@ -414,7 +414,7 @@ class route @param $e Exception to print */ public function error ($e) { - if ($e->getCode () === "") + if ($e->getCode () === "" || $e->getCode () === 0) $getCode = 500; else $getCode = $e->getCode ();