Skip to content

Commit 08e1d80

Browse files
authored
Update XHProfMiddleware.php
Fix - first request after enabling xhprof did not get profiled
1 parent 469d876 commit 08e1d80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Middleware/XHProfMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function handle(Request $request, Closure $next)
2828

2929
//if profiler is enabled in config, don't wait for ?_profile=1 get parameter (which sets the cookie)
3030
//to start profiling, just enable it immediately
31-
setcookie('_profile', 1);
31+
$_COOKIE['_profile'] = 1;
3232

3333
require_once public_path(). '/vendor/xhprof/external/header.php';
3434
}

0 commit comments

Comments
 (0)