summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-03-17 14:40:39 -0600
committerRoeland Jago Douma <roeland@famdouma.nl>2017-03-26 10:59:58 +0200
commit2249c77a06d7238a8f4234f636f4cdddd07d56a4 (patch)
tree86278156f7d313381bdd13ed1355fdb0bee23a34 /apps/updatenotification
parent3668673d7b3f64a5aaa80f569856b88460d9a522 (diff)
downloadnextcloud-server-2249c77a06d7238a8f4234f636f4cdddd07d56a4.tar.gz
nextcloud-server-2249c77a06d7238a8f4234f636f4cdddd07d56a4.zip
Also remove failure notification if no update is available
* error happened and vanished the notification should also vanish even if no update is available Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/updatenotification')
-rw-r--r--apps/updatenotification/lib/Notification/BackgroundJob.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/updatenotification/lib/Notification/BackgroundJob.php b/apps/updatenotification/lib/Notification/BackgroundJob.php
index c3dd748116c..9155b9d2556 100644
--- a/apps/updatenotification/lib/Notification/BackgroundJob.php
+++ b/apps/updatenotification/lib/Notification/BackgroundJob.php
@@ -98,11 +98,13 @@ class BackgroundJob extends TimedJob {
if (in_array($errors, $this->connectionNotifications, true)) {
$this->sendErrorNotifications($errors);
}
- } else if (isset($status['version'])) {
+ } else if (is_array($status)) {
$this->config->setAppValue('updatenotification', 'update_check_errors', 0);
$this->clearErrorNotifications();
- $this->createNotifications('core', $status['version'], $status['versionstring']);
+ if (isset($status['version'])) {
+ $this->createNotifications('core', $status['version'], $status['versionstring']);
+ }
}
}