diff --git a/engine/Shopware/Bundle/ESIndexingBundle/Commands/IndexPopulateCommand.php b/engine/Shopware/Bundle/ESIndexingBundle/Commands/IndexPopulateCommand.php index ba818014dbb..dcba3140f35 100644 --- a/engine/Shopware/Bundle/ESIndexingBundle/Commands/IndexPopulateCommand.php +++ b/engine/Shopware/Bundle/ESIndexingBundle/Commands/IndexPopulateCommand.php @@ -94,11 +94,15 @@ protected function configure() */ protected function execute(InputInterface $input, OutputInterface $output) { - if ($shopId = $input->getOption('shopId')) { + if ($input->getOption('shopId')) { $shops = []; foreach ($input->getOption('shopId') as $shopId) { - $shops[] = $this->container->get(ShopGatewayInterface::class)->get($shopId); + $shop = $this->container->get(ShopGatewayInterface::class)->get($shopId); + + if ($shop instanceof Shop) { + $shops[] = $shop; + } } } else { $shops = $this->container->get(IdentifierSelector::class)->getShops();