From 08e1d80c22697bd04e98b584e02d63a4bdbc8071 Mon Sep 17 00:00:00 2001 From: Zacharias Creutznacher Date: Wed, 12 Oct 2022 08:37:12 +0200 Subject: [PATCH] Update XHProfMiddleware.php Fix - first request after enabling xhprof did not get profiled --- src/Middleware/XHProfMiddleware.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Middleware/XHProfMiddleware.php b/src/Middleware/XHProfMiddleware.php index 9ff7a17..c7cf5bd 100644 --- a/src/Middleware/XHProfMiddleware.php +++ b/src/Middleware/XHProfMiddleware.php @@ -28,7 +28,7 @@ public function handle(Request $request, Closure $next) //if profiler is enabled in config, don't wait for ?_profile=1 get parameter (which sets the cookie) //to start profiling, just enable it immediately - setcookie('_profile', 1); + $_COOKIE['_profile'] = 1; require_once public_path(). '/vendor/xhprof/external/header.php'; }