Merge pull request #1554 from nextcloud/updatestate-can-be-empty

UpdateState is empty if no update is available
This commit is contained in:
Lukas Reschke 2016-09-28 13:03:28 +02:00 committed by GitHub
commit 32640c9a5b
2 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ class AdminController extends Controller implements ISettings {
'channels' => $channels, 'channels' => $channels,
'newVersionString' => (empty($updateState['updateVersion'])) ? '' : $updateState['updateVersion'], 'newVersionString' => (empty($updateState['updateVersion'])) ? '' : $updateState['updateVersion'],
'downloadLink' => (empty($updateState['downloadLink'])) ? '' : $updateState['downloadLink'], 'downloadLink' => (empty($updateState['downloadLink'])) ? '' : $updateState['downloadLink'],
'updaterEnabled' => $updateState['updaterEnabled'], 'updaterEnabled' => (empty($updateState['updaterEnabled'])) ? false : $updateState['updaterEnabled'],
'notify_groups' => implode('|', $notifyGroups), 'notify_groups' => implode('|', $notifyGroups),
]; ];

View File

@ -162,7 +162,7 @@ class AdminControllerTest extends TestCase {
$this->updateChecker $this->updateChecker
->expects($this->once()) ->expects($this->once())
->method('getUpdateState') ->method('getUpdateState')
->willReturn(['updaterEnabled' => false]); ->willReturn([]);
$params = [ $params = [
'isNewVersionAvailable' => false, 'isNewVersionAvailable' => false,