1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 12:42:36 +01:00

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;
}
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