diff --git a/resources/views/errors/500.twig b/resources/views/errors/500.twig index 77168b2..4bbbdd7 100644 --- a/resources/views/errors/500.twig +++ b/resources/views/errors/500.twig @@ -1 +1 @@ -An error has occured \ No newline at end of file +Er is helaas iets mis gegaan. Probeer het opnieuw \ No newline at end of file diff --git a/src/Runtime/Config/Env.php b/src/Runtime/Config/Env.php index 49a4376..5f6db01 100644 --- a/src/Runtime/Config/Env.php +++ b/src/Runtime/Config/Env.php @@ -27,8 +27,8 @@ class Env { private static function filter(string $result) { switch ($result) { - case filter_var($result, FILTER_VALIDATE_BOOLEAN): - return (bool) $result; + case in_array($result, ['true', 'false']): + return filter_var($result, FILTER_VALIDATE_BOOLEAN); break; case filter_var($result, FILTER_VALIDATE_INT): return (int) $result; diff --git a/src/Runtime/Exceptions/ExceptionHandler.php b/src/Runtime/Exceptions/ExceptionHandler.php index 8af58cd..e4ec7da 100644 --- a/src/Runtime/Exceptions/ExceptionHandler.php +++ b/src/Runtime/Exceptions/ExceptionHandler.php @@ -8,6 +8,7 @@ use Whoops\Handler\PlainTextHandler; use Whoops\Run; use Whoops\Handler\PrettyPageHandler; use Whoops\Util\Misc; +use function DI\value; class ExceptionHandler { @@ -40,7 +41,7 @@ class ExceptionHandler { { self::$handler = new Run(); - $debug = true; //TODO: Get from config + $debug = env('debug'); if($debug === false) { self::$handler->pushHandler(function() {