Module list should not throw Exceptions if no config is present

This commit is contained in:
Thomas Gelf 2014-04-17 21:16:51 +00:00
parent 039aa76467
commit fa3e7f9fc2
1 changed files with 4 additions and 4 deletions

View File

@ -128,10 +128,10 @@ class Manager
private function detectEnabledModules()
{
$canonical = $this->enableDir;
if ($canonical === false) {
throw new NotReadableError(
'Cannot read enabled modules. Module directory "' . $this->enableDir . '" does not exist'
);
if ($canonical === false || ! file_exists($canonical)) {
// TODO: I guess the check for false has something to do with a
// call to realpath no longer present
return;
}
if (!is_dir($this->enableDir)) {
throw new NotReadableError(