From 3a4e14c20c2b5dca614e6146109e3330b82d1ef6 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 29 Dec 2017 14:26:23 +0200 Subject: [PATCH] Check if Crawler exists in handler.php --- app/Exceptions/Handler.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 8922c26ba5ab..99a527d25a77 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -50,6 +50,10 @@ class Handler extends ExceptionHandler return false; } + if (! class_exists('Utils')) { + return parent::report($e); + } + if (Crawler::isCrawler()) { return false; } @@ -93,6 +97,10 @@ class Handler extends ExceptionHandler return Redirect::to('/'); } + if (! class_exists('Utils')) { + return parent::render($request, $e); + } + if ($e instanceof TokenMismatchException) { if (! in_array($request->path(), ['get_started', 'save_sidebar_state'])) { // https://gist.github.com/jrmadsen67/bd0f9ad0ef1ed6bb594e