* [FIX] Fixed wrong behaviour when config parameter was not found

This commit is contained in:
nuxsmin
2018-07-16 01:41:39 +02:00
parent 889572a9e1
commit 95e7d02c7c
2 changed files with 11 additions and 6 deletions

View File

@@ -237,10 +237,11 @@ class ConfigManagerController extends ControllerBase
$configService = $this->dic->get(ConfigService::class);
$template->assign('lastUpdateMPass', $configService->getByParam('lastupdatempass', 0));
$template->assign('tempMasterPassTime', $configService->getByParam('tempmaster_passtime', 0));
$template->assign('tempMasterMaxTime', $configService->getByParam('tempmaster_maxtime', 0));
$tempMasterAttempts = sprintf('%d/%d', $configService->getByParam('tempmaster_attempts', 0), TemporaryMasterPassService::MAX_ATTEMPTS);
$template->assign('tempMasterPassTime', $configService->getByParam(TemporaryMasterPassService::PARAM_TIME, 0));
$template->assign('tempMasterMaxTime', $configService->getByParam(TemporaryMasterPassService::PARAM_MAX_TIME, 0));
$tempMasterAttempts = sprintf('%d/%d', $configService->getByParam(TemporaryMasterPassService::PARAM_ATTEMPTS, 0), TemporaryMasterPassService::MAX_ATTEMPTS);
$template->assign('tempMasterAttempts', $tempMasterAttempts);
$template->assign('tempMasterPass', $this->session->getTemporaryMasterPass());