From 5115d05ada0dceef579938544b90d7db96e34f80 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 6 Nov 2016 23:19:35 +0100 Subject: [PATCH] fix vars and reporting --- app/ExceptionHandler.php | 6 +++--- config/config.example.ini | 2 +- resources/views/yuuno/errors/500.twig | 4 ++-- resources/views/yuuno/errors/503.twig | 8 +++++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/ExceptionHandler.php b/app/ExceptionHandler.php index aed918e..253983b 100644 --- a/app/ExceptionHandler.php +++ b/app/ExceptionHandler.php @@ -38,13 +38,13 @@ class ExceptionHandler */ public static function exception(Throwable $ex) { - $report = config('dev.report_host'); + $report = strlen(config('dev.report_host')) > 0; - if ($report !== null) { + if ($report) { self::report($ex, $report); } - self::view($ex, $report !== null); + self::view($ex, $report); } /** diff --git a/config/config.example.ini b/config/config.example.ini index f88a620..02cf626 100644 --- a/config/config.example.ini +++ b/config/config.example.ini @@ -14,7 +14,7 @@ ; ; sqlite ; driver = sqlite -; database = sakura.sq3 +; database = sakura.db3 ; ; Although the option exists, setting a table prefix for sqlite breaks some migration related things. ; prefix = diff --git a/resources/views/yuuno/errors/500.twig b/resources/views/yuuno/errors/500.twig index 16c2043..937f12d 100644 --- a/resources/views/yuuno/errors/500.twig +++ b/resources/views/yuuno/errors/500.twig @@ -14,13 +14,13 @@

The page you are looking for experienced a severe explosion.

- {% if reported %} + {% if reported is defined and reported %}

The developers have been notified of this issue, sorry for the inconvenience!

{% endif %}
- {% if message %} + {% if message is defined %}

{{ message }}

diff --git a/resources/views/yuuno/errors/503.twig b/resources/views/yuuno/errors/503.twig index 65fef37..24c8d56 100644 --- a/resources/views/yuuno/errors/503.twig +++ b/resources/views/yuuno/errors/503.twig @@ -15,9 +15,11 @@ The page you are looking for is temporarily unavailable.


-

- {{ message }} -

+ {% if message is defined %} +

+ {{ message }} +

+ {% endif %}

HTTP 503 - Service unavailable