Skip to content

Commit

Permalink
Display an error message when enabled modules cannot be read because …
Browse files Browse the repository at this point in the history
…/etc/icingaweb2 is not readable

resolves #9141
  • Loading branch information
Al2Klimov committed Apr 22, 2015
1 parent d3964a3 commit 9393d11
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions library/Icinga/Application/Modules/Manager.php
Expand Up @@ -101,6 +101,16 @@ public function select()
*/
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;
}
Expand Down

0 comments on commit 9393d11

Please sign in to comment.