From 2249c77a06d7238a8f4234f636f4cdddd07d56a4 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 17 Mar 2017 14:40:39 -0600 Subject: [PATCH] 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 --- apps/updatenotification/lib/Notification/BackgroundJob.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/updatenotification/lib/Notification/BackgroundJob.php b/apps/updatenotification/lib/Notification/BackgroundJob.php index c3dd748116..9155b9d255 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']); + } } }