From ddc077b4f946000aa26adeb29125e2055490c43e Mon Sep 17 00:00:00 2001 From: Troy Siedsma Date: Wed, 18 May 2016 09:43:07 -0500 Subject: [PATCH] Fix issue with maintenance mode --- src/LithiumDev/ExceptionMailer/ExceptionHandler.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/LithiumDev/ExceptionMailer/ExceptionHandler.php b/src/LithiumDev/ExceptionMailer/ExceptionHandler.php index 356f9c9..b695f02 100644 --- a/src/LithiumDev/ExceptionMailer/ExceptionHandler.php +++ b/src/LithiumDev/ExceptionMailer/ExceptionHandler.php @@ -32,6 +32,15 @@ public function report(Exception $e) } } + /* + * If maintenance mode is enabled, a 500 error will be displayed instead of the error page + * Skip the mailer in this one instance + */ + if (app()->isDownForMaintenance()) + { + $shouldReport = false; + } + if ($shouldReport) { $eMailer = App::make('ExceptionMailer');