diff --git a/app/Http/Middleware/MeasureExecutionTime.php b/app/Http/Middleware/MeasureExecutionTime.php index 0988a841..04ccef4d 100644 --- a/app/Http/Middleware/MeasureExecutionTime.php +++ b/app/Http/Middleware/MeasureExecutionTime.php @@ -21,6 +21,9 @@ class MeasureExecutionTime { // Get the response $response = $next($request); + if(!defined('LUMEN_START')) { + return $response; + } // Calculate execution time $executionTime = microtime(true) - LUMEN_START; diff --git a/bootstrap/app.php b/bootstrap/app.php index c210fa86..a76c1a0c 100755 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -11,7 +11,9 @@ | */ -define('LUMEN_START', microtime(true)); +if(!defined('LUMEN_START')) { + define('LUMEN_START', microtime(true)); +} $app = new Illuminate\Foundation\Application( realpath(__DIR__.'/../')