Skip to content

Commit

Permalink
Merge pull request #48 from HavokInspiration/patch-1
Browse files Browse the repository at this point in the history
Check if the DebugKit plugin is loaded before binding an event linked to it
  • Loading branch information
WyriHaximus committed Jan 19, 2017
2 parents 216332c + 97e1400 commit 602e3ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/bootstrap.php
@@ -1,13 +1,14 @@
<?php

use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Event\EventManager;
use WyriHaximus\TwigView\Event;

EventManager::instance()->on(new Event\ExtensionsListener());
EventManager::instance()->on(new Event\TokenParsersListener());

if (Configure::read('debug')) {
if (Configure::read('debug') && Plugin::loaded('DebugKit')) {
Configure::write('DebugKit.panels', array_merge(
(array)Configure::read('DebugKit.panels'),
[
Expand Down

0 comments on commit 602e3ad

Please sign in to comment.