From c3fe14a205d5e4ecf91fc006a8744f38a965fa4f Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Tue, 4 Aug 2015 14:34:30 +0200 Subject: [PATCH] Modules/Manager: Fix that non-existent modules can be disabled fixes #9374 --- library/Icinga/Application/Modules/Manager.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Application/Modules/Manager.php b/library/Icinga/Application/Modules/Manager.php index 8a3970841..f3bf4e016 100644 --- a/library/Icinga/Application/Modules/Manager.php +++ b/library/Icinga/Application/Modules/Manager.php @@ -281,7 +281,10 @@ class Manager public function disableModule($name) { if (! $this->hasEnabled($name)) { - return $this; + throw new ConfigurationError( + 'Cannot disable module "%s". Module is not installed.', + $name + ); } if (! is_writable($this->enableDir)) {