Skip to content

Commit

Permalink
Enabled MaintenanceModeListenes when drupal is installed (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjuarez20 authored and enzolutions committed May 22, 2019
1 parent 780abbe commit 934d14f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,14 @@ private function registerEvents()
)
);

$dispatcher->addSubscriber(
new MaintenanceModeListener(
$this->container->get('console.translator_manager'),
$this->container->get('state')
)
);
if($this->container->has('state')) {
$dispatcher->addSubscriber(
new MaintenanceModeListener(
$this->container->get('console.translator_manager'),
$this->container->get('state')
)
);
}

$this->setDispatcher($dispatcher);
$this->eventRegistered = true;
Expand Down

0 comments on commit 934d14f

Please sign in to comment.