From 934d14ffcba4cd1d580534ccac409f4a6b27abe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harold=20Ju=C3=A1rez?= Date: Wed, 22 May 2019 12:36:25 -0600 Subject: [PATCH] Enabled MaintenanceModeListenes when drupal is installed (#351) --- src/Application.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Application.php b/src/Application.php index a4df73c..1f1ed57 100644 --- a/src/Application.php +++ b/src/Application.php @@ -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;