From 69cb55582cff22975bd38f85b0862f8a720b80bf Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Mon, 14 Aug 2017 18:41:55 -0500 Subject: [PATCH] damn you travis. fixed multiple define --- app/Http/Middleware/MeasureExecutionTime.php | 3 +++ bootstrap/app.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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__.'/../')