From e076d2d1d643d1492ec75e832c02a4bd0bff8f37 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 4 Jun 2014 22:52:38 +0000 Subject: [PATCH] bootstrapping: create only one CLI loader instance This used to work fine as long as you didn't try to interfere from outside to influence the cli loader. The instance returned by cliLoader() was not the same as used internally once dispatching the CLI command. refs #6411 --- library/Icinga/Application/Cli.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Application/Cli.php b/library/Icinga/Application/Cli.php index 72b2b43f8..c5dfc092a 100644 --- a/library/Icinga/Application/Cli.php +++ b/library/Icinga/Application/Cli.php @@ -138,7 +138,7 @@ class Cli extends ApplicationBootstrap protected function dispatchOnce() { - $loader = new Loader($this); + $loader = $this->cliLoader(); $loader->parseParams(); $loader->dispatch(); Benchmark::measure('All done'); @@ -149,7 +149,7 @@ class Cli extends ApplicationBootstrap protected function dispatchEndless() { - $loader = new Loader($this); + $loader = $this->cliLoader(); $loader->parseParams(); $screen = Screen::instance();