Skip to content

Commit 81c459d

Browse files
committed
Fix console error listener when there is no command yet
1 parent a99f756 commit 81c459d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AppBundle/EventListener/CheckRequirementsSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function handleConsoleError(ConsoleErrorEvent $event)
6767
{
6868
$commandNames = ['doctrine:fixtures:load', 'doctrine:database:create', 'doctrine:schema:create', 'doctrine:database:drop'];
6969

70-
if (in_array($event->getCommand()->getName(), $commandNames, true)) {
70+
if ($event->getCommand() && in_array($event->getCommand()->getName(), $commandNames, true)) {
7171
if ($this->isSQLitePlatform() && !extension_loaded('sqlite3')) {
7272
$io = new SymfonyStyle($event->getInput(), $event->getOutput());
7373
$io->error('This command requires to have the "sqlite3" PHP extension enabled because, by default, the Symfony Demo application uses SQLite to store its information.');

0 commit comments

Comments
 (0)