Skip to content

Commit 711fe6a

Browse files
authored
Check if octane needs to enable/disbale (#1917)
1 parent f2200f8 commit 711fe6a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/LaravelDebugbar.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@ public function reset(): void
698698
$this->messagesCollector->reset();
699699
$this->stackedData = [];
700700
$this->responseIsModified = false;
701+
$this->enabled = null;
701702
}
702703

703704
/**

src/Support/Octane/ResetDebugbar.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ public function handle(RequestReceived $event): void
2323
$debugbar->setApplication($event->sandbox);
2424
$debugbar->reset();
2525

26+
if ($debugbar->isEnabled() && !$debugbar->requestIsExcluded($event->request)) {
27+
$debugbar->boot();
28+
}
29+
2630
if ($requestStartTime = $event->request->server->get('REQUEST_TIME_FLOAT')) {
2731
$debugbar->getTimeCollector()->setRequestStartTime((float) $requestStartTime);
2832
}

0 commit comments

Comments
 (0)