Fix an error that PopulateCommand would always ignore errors

This commit is contained in:
Tim Nagel 2015-03-11 15:11:13 +11:00
parent cb7b4c1dca
commit 47785260a4
2 changed files with 8 additions and 7 deletions

View file

@ -31,3 +31,5 @@ https://github.com/FriendsOfSymfony/FOSElasticaBundle/compare/v3.0.4...v3.1.0
that property while transforming. Combined with the above POST_TRANSFORM event
developers can now create calculated dynamic properties on Elastica documents
for indexing. #794
* Fixed a case where ProgressCommand would always ignore errors regardless of
--ignore-errors being passed or not.

View file

@ -70,16 +70,15 @@ class PopulateCommand extends ContainerAwareCommand
}
/**
* @see Symfony\Component\Console\Command\Command::execute()
* {@inheritDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$index = $input->getOption('index');
$type = $input->getOption('type');
$reset = !$input->getOption('no-reset');
$options = $input->getOptions();
$options['ignore-errors'] = $input->hasOption('ignore-errors');
$index = $input->getOption('index');
$type = $input->getOption('type');
$reset = !$input->getOption('no-reset');
$options = $input->getOptions();
$options['ignore-errors'] = $input->getOption('ignore-errors');
if ($input->isInteractive() && $reset && $input->getOption('offset')) {
/** @var DialogHelper $dialog */