We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 780abbe commit 934d14fCopy full SHA for 934d14f
src/Application.php
@@ -311,12 +311,14 @@ private function registerEvents()
311
)
312
);
313
314
- $dispatcher->addSubscriber(
315
- new MaintenanceModeListener(
316
- $this->container->get('console.translator_manager'),
317
- $this->container->get('state')
318
- )
319
- );
+ if($this->container->has('state')) {
+ $dispatcher->addSubscriber(
+ new MaintenanceModeListener(
+ $this->container->get('console.translator_manager'),
+ $this->container->get('state')
+ )
320
+ );
321
+ }
322
323
$this->setDispatcher($dispatcher);
324
$this->eventRegistered = true;
0 commit comments