Skip to content

Commit 934d14f

Browse files
hjuarez20enzolutions
authored andcommitted
Enabled MaintenanceModeListenes when drupal is installed (#351)
1 parent 780abbe commit 934d14f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/Application.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,14 @@ private function registerEvents()
311311
)
312312
);
313313

314-
$dispatcher->addSubscriber(
315-
new MaintenanceModeListener(
316-
$this->container->get('console.translator_manager'),
317-
$this->container->get('state')
318-
)
319-
);
314+
if($this->container->has('state')) {
315+
$dispatcher->addSubscriber(
316+
new MaintenanceModeListener(
317+
$this->container->get('console.translator_manager'),
318+
$this->container->get('state')
319+
)
320+
);
321+
}
320322

321323
$this->setDispatcher($dispatcher);
322324
$this->eventRegistered = true;

0 commit comments

Comments
 (0)