diff --git a/src/Oro/Bundle/CronBundle/Command/CronCommand.php b/src/Oro/Bundle/CronBundle/Command/CronCommand.php index 77213c60e1f..eb190927786 100644 --- a/src/Oro/Bundle/CronBundle/Command/CronCommand.php +++ b/src/Oro/Bundle/CronBundle/Command/CronCommand.php @@ -81,23 +81,23 @@ protected function execute(InputInterface $input, OutputInterface $output) } /** + * Convert command arguments to options. It needed for correctly pass this arguments into ArrayInput: + * new ArrayInput(['name' => 'foo', '--bar' => 'foobar']); + * * @param array $commandOptions * @return array */ protected function resolveOptions(array $commandOptions) { $options = []; - foreach ($commandOptions as $key => $option) { $params = explode('=', $option, 2); - if (is_array($params) && count($params) === 2) { $options[$params[0]] = $params[1]; } else { $options[$key] = $option; } } - return $options; } diff --git a/src/Oro/Bundle/WorkflowBundle/Command/HandleTransitionCronTriggerCommand.php b/src/Oro/Bundle/WorkflowBundle/Command/HandleTransitionCronTriggerCommand.php index beaa687b014..1cdb43d4142 100644 --- a/src/Oro/Bundle/WorkflowBundle/Command/HandleTransitionCronTriggerCommand.php +++ b/src/Oro/Bundle/WorkflowBundle/Command/HandleTransitionCronTriggerCommand.php @@ -4,12 +4,12 @@ use Doctrine\Common\Persistence\ObjectRepository; -use Oro\Bundle\CronBundle\Command\CronCommandInterface; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use Oro\Bundle\CronBundle\Command\CronCommandInterface; use Oro\Bundle\WorkflowBundle\Async\TransitionTriggerMessage; use Oro\Bundle\WorkflowBundle\Async\TransitionTriggerProcessor; use Oro\Bundle\WorkflowBundle\Entity\TransitionCronTrigger;