diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-09-28 13:03:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-28 13:03:22 +0200 |
commit | 51249f7dde3cd8be1a5862769d438cb3aa307923 (patch) | |
tree | 327ba1fa672883ace7936b016f76bb0dae84ea6e /apps | |
parent | ad9b154700277da62728688ab41d8bbe88640350 (diff) | |
parent | 98df88950f2c5f09c2d983f95f7bc9a1b1344c1b (diff) | |
download | nextcloud-server-51249f7dde3cd8be1a5862769d438cb3aa307923.tar.gz nextcloud-server-51249f7dde3cd8be1a5862769d438cb3aa307923.zip |
Merge pull request #1555 from nextcloud/updatestate-can-be-empty-stable10
[stable10] UpdateState is empty if no update is available
Diffstat (limited to 'apps')
-rw-r--r-- | apps/updatenotification/lib/Controller/AdminController.php | 2 | ||||
-rw-r--r-- | apps/updatenotification/tests/Controller/AdminControllerTest.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/updatenotification/lib/Controller/AdminController.php b/apps/updatenotification/lib/Controller/AdminController.php index 56f41ebf3ee..0a867f1267c 100644 --- a/apps/updatenotification/lib/Controller/AdminController.php +++ b/apps/updatenotification/lib/Controller/AdminController.php @@ -113,7 +113,7 @@ class AdminController extends Controller implements ISettings { 'channels' => $channels, 'newVersionString' => (empty($updateState['updateVersion'])) ? '' : $updateState['updateVersion'], 'downloadLink' => (empty($updateState['downloadLink'])) ? '' : $updateState['downloadLink'], - 'updaterEnabled' => $updateState['updaterEnabled'], + 'updaterEnabled' => (empty($updateState['updaterEnabled'])) ? false : $updateState['updaterEnabled'], 'notify_groups' => implode('|', $notifyGroups), ]; diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php index 336da09ec7a..e731b9fb428 100644 --- a/apps/updatenotification/tests/Controller/AdminControllerTest.php +++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php @@ -161,7 +161,7 @@ class AdminControllerTest extends TestCase { $this->updateChecker ->expects($this->once()) ->method('getUpdateState') - ->willReturn(['updaterEnabled' => false]); + ->willReturn([]); $params = [ 'isNewVersionAvailable' => false, |