From e87caedf7e0c650fa94726ec80059cfab89251d3 Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Sun, 26 Aug 2018 12:17:31 +0200 Subject: [PATCH] Add license header and fix undefined index error Signed-off-by: Tobia De Koninck --- apps/updatenotification/lib/Command/Check.php | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/apps/updatenotification/lib/Command/Check.php b/apps/updatenotification/lib/Command/Check.php index bca89adaa54..c6109e44e6a 100644 --- a/apps/updatenotification/lib/Command/Check.php +++ b/apps/updatenotification/lib/Command/Check.php @@ -1,5 +1,26 @@ . + * + */ + namespace OCA\UpdateNotification\Command; use OC\App\AppManager; @@ -43,7 +64,7 @@ class Check extends Command { protected function execute(InputInterface $input, OutputInterface $output) { // Server $r = $this->updateChecker->getUpdateState(); - if ($r['updateAvailable']) { + if (isset($r['updateAvailable']) && $r['updateAvailable']) { $output->writeln($r['updateVersion'] . ' is available. Get more information on how to update at '. $r['updateLink'] . '.'); }