diff options
author | Tobia De Koninck <LEDfan@users.noreply.github.com> | 2018-08-26 12:17:31 +0200 |
---|---|---|
committer | Tobia De Koninck <LEDfan@users.noreply.github.com> | 2018-08-27 12:11:31 +0200 |
commit | e87caedf7e0c650fa94726ec80059cfab89251d3 (patch) | |
tree | ec12443cbeff12c3320392ff1fb1ffa42128c5f9 /apps/updatenotification/lib | |
parent | d2a5790053524437b907f616a7dea4016d79ac70 (diff) | |
download | nextcloud-server-e87caedf7e0c650fa94726ec80059cfab89251d3.tar.gz nextcloud-server-e87caedf7e0c650fa94726ec80059cfab89251d3.zip |
Add license header and fix undefined index error
Signed-off-by: Tobia De Koninck <LEDfan@users.noreply.github.com>
Diffstat (limited to 'apps/updatenotification/lib')
-rw-r--r-- | apps/updatenotification/lib/Command/Check.php | 23 |
1 files changed, 22 insertions, 1 deletions
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 @@ <?php +/** + * + * @copyright Copyright (c) 2018, Tobia De Koninck (tobia@ledfan.be) + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + 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'] . '.'); } |