Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-09-28 14:03:22 +0300
committerGitHub <noreply@github.com>2016-09-28 14:03:22 +0300
commit51249f7dde3cd8be1a5862769d438cb3aa307923 (patch)
tree327ba1fa672883ace7936b016f76bb0dae84ea6e
parentad9b154700277da62728688ab41d8bbe88640350 (diff)
parent98df88950f2c5f09c2d983f95f7bc9a1b1344c1b (diff)
Merge pull request #1555 from nextcloud/updatestate-can-be-empty-stable10
[stable10] UpdateState is empty if no update is available
-rw-r--r--apps/updatenotification/lib/Controller/AdminController.php2
-rw-r--r--apps/updatenotification/tests/Controller/AdminControllerTest.php2
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,