Check if Crawler exists in handler.php

This commit is contained in:
Hillel Coren 2017-12-29 14:26:23 +02:00
parent ec4490450c
commit 3a4e14c20c

View File

@ -50,6 +50,10 @@ class Handler extends ExceptionHandler
return false; return false;
} }
if (! class_exists('Utils')) {
return parent::report($e);
}
if (Crawler::isCrawler()) { if (Crawler::isCrawler()) {
return false; return false;
} }
@ -93,6 +97,10 @@ class Handler extends ExceptionHandler
return Redirect::to('/'); return Redirect::to('/');
} }
if (! class_exists('Utils')) {
return parent::render($request, $e);
}
if ($e instanceof TokenMismatchException) { if ($e instanceof TokenMismatchException) {
if (! in_array($request->path(), ['get_started', 'save_sidebar_state'])) { if (! in_array($request->path(), ['get_started', 'save_sidebar_state'])) {
// https://gist.github.com/jrmadsen67/bd0f9ad0ef1ed6bb594e // https://gist.github.com/jrmadsen67/bd0f9ad0ef1ed6bb594e