Fix potential undefined variable

This commit is contained in:
Joas Schilling 2015-04-18 10:20:13 +02:00
parent 4d238c3949
commit b5c5775626
1 changed files with 2 additions and 2 deletions

View File

@ -92,13 +92,13 @@ try {
$defaultEncryptionModule = \OC::$server->getEncryptionManager()->getDefaultEncryptionModule();
$defaultEncryptionModuleId = $defaultEncryptionModule->getId();
} catch (Exception $e) {
$defaultEncryptionModule = null;
$defaultEncryptionModuleId = null;
}
$encModulues = array();
foreach ($encryptionModules as $module) {
$encModulues[$module['id']]['displayName'] = $module['displayName'];
$encModulues[$module['id']]['default'] = false;
if ($defaultEncryptionModule && $module['id'] === $defaultEncryptionModuleId) {
if ($module['id'] === $defaultEncryptionModuleId) {
$encModulues[$module['id']]['default'] = true;
}
}