Skip to content

Commit 855fb59

Browse files
authored
Merge pull request #680 from cakephp/issue-671
Don't try to enable panels if service is disabled.
2 parents 15ea70c + 5ead0f5 commit 855fb59

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/Middleware/DebugKitMiddleware.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ public function __construct(?ToolbarService $service = null)
5050
*/
5151
public function __invoke($request, $response, $next)
5252
{
53+
if (!$this->service->isEnabled()) {
54+
return $next($request, $response);
55+
}
56+
5357
$this->service->loadPanels();
5458
$this->service->initializePanels();
5559
$response = $next($request, $response);

0 commit comments

Comments
 (0)