Fix debug setting exception handler
This commit is contained in:
parent
b32fdef1ec
commit
2e08a63aa7
3 changed files with 5 additions and 4 deletions
|
@ -1 +1 @@
|
|||
An error has occured
|
||||
Er is helaas iets mis gegaan. Probeer het opnieuw
|
|
@ -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;
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue