Add license header and fix undefined index error

Signed-off-by: Tobia De Koninck <LEDfan@users.noreply.github.com>
This commit is contained in:
Tobia De Koninck 2018-08-26 12:17:31 +02:00
parent d2a5790053
commit e87caedf7e
1 changed files with 22 additions and 1 deletions

View File

@ -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'] . '.');
}