diff --git a/library/Icinga/Application/Modules/Manager.php b/library/Icinga/Application/Modules/Manager.php index 90e55f0b4..84ee5e650 100644 --- a/library/Icinga/Application/Modules/Manager.php +++ b/library/Icinga/Application/Modules/Manager.php @@ -101,6 +101,16 @@ class Manager */ private function detectEnabledModules() { + if (false === file_exists($parent = dirname($this->enableDir))) { + return; + } + if (false === is_readable($parent)) { + throw new NotReadableError( + 'Cannot read enabled modules. Module directory\'s parent directory "%s" is not readable', + $parent + ); + } + if (! file_exists($this->enableDir)) { return; }