]> BookStack Code Mirror - bookstack/blobdiff - app/Exceptions/Handler.php
Added tests and translations for dark-mode components
[bookstack] / app / Exceptions / Handler.php
index 284d731d7194a434b3cdc69dea3e5a9d1ad3efd6..a3bc1e8b9e222e102fe7a8c93b1d2161362a0e8b 100644 (file)
@@ -57,7 +57,10 @@ class Handler extends ExceptionHandler
         // Handle notify exceptions which will redirect to the
         // specified location then show a notification message.
         if ($this->isExceptionType($e, NotifyException::class)) {
-            session()->flash('error', $this->getOriginalMessage($e));
+            $message = $this->getOriginalMessage($e);
+            if (!empty($message)) {
+                session()->flash('error', $message);
+            }
             return redirect($e->redirectLocation);
         }