From 806d52dfc1e5d22c4c6dc0597c867b9496b64e30 Mon Sep 17 00:00:00 2001 From: Kamil Madejski Date: Wed, 19 Sep 2018 11:24:26 +0200 Subject: [PATCH 1/2] EZP-29619: StashPass should check if config[caches] is set (#2450) --- .../DependencyInjection/Compiler/StashPass.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eZ/Bundle/EzPublishCoreBundle/DependencyInjection/Compiler/StashPass.php b/eZ/Bundle/EzPublishCoreBundle/DependencyInjection/Compiler/StashPass.php index 984ba23b211..735aa50ecc7 100644 --- a/eZ/Bundle/EzPublishCoreBundle/DependencyInjection/Compiler/StashPass.php +++ b/eZ/Bundle/EzPublishCoreBundle/DependencyInjection/Compiler/StashPass.php @@ -30,9 +30,11 @@ public function process(ContainerBuilder $container) $config = $container->getExtensionConfig('stash'); $config = reset($config); - foreach ($config['caches'] as $name => $configuration) { - if (in_array('Redis', $configuration['drivers'], true)) { - $this->configureRedis($container, $igbinary, $lzf); + if (isset($config['caches'])) { + foreach ($config['caches'] as $name => $configuration) { + if (in_array('Redis', $configuration['drivers'], true)) { + $this->configureRedis($container, $igbinary, $lzf); + } } } From 398a3bcc1f88e4457fcc963845b48f787524898d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Wed, 19 Sep 2018 11:22:08 +0200 Subject: [PATCH 2/2] EZP-29504: Fix error when siteaccess is not set Fixes regression from #2418 --- eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php b/eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php index b415f0d798f..10f0c430dcc 100644 --- a/eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php +++ b/eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php @@ -375,12 +375,12 @@ private function fetchIteration(Statement $stmt, $iterationCount) */ private function getPhpProcess(array $contentIds, $commit) { - $process = new ProcessBuilder([ + $process = new ProcessBuilder(array_filter([ file_exists('bin/console') ? 'bin/console' : 'app/console', $this->siteaccess ? '--siteaccess=' . $this->siteaccess : null, 'ezplatform:reindex', '--content-ids=' . implode(',', $contentIds), - ]); + ])); $process->setTimeout(null); $process->setPrefix($this->getPhpPath());