Merge pull request #932 from nextcloud/backport-930-check-isset-require

[stable10] Fix "Undefined index" when the values do not exist
This commit is contained in:
Roeland Jago Douma 2016-08-18 14:16:31 +02:00 committed by GitHub
commit 99a39ad209
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ class InfoChecker extends BasicEmitter {
$info = $this->infoParser->parse($appPath . '/appinfo/info.xml'); $info = $this->infoParser->parse($appPath . '/appinfo/info.xml');
if (isset($info['dependencies']['owncloud']['@attributes']['min-version']) && ($info['requiremin'] || $info['require'])) { if (isset($info['dependencies']['owncloud']['@attributes']['min-version']) && (isset($info['requiremin']) || isset($info['require']))) {
$this->emit('InfoChecker', 'duplicateRequirement', ['min']); $this->emit('InfoChecker', 'duplicateRequirement', ['min']);
$errors[] = [ $errors[] = [
'type' => 'duplicateRequirement', 'type' => 'duplicateRequirement',
@ -90,7 +90,7 @@ class InfoChecker extends BasicEmitter {
$this->emit('InfoChecker', 'missingRequirement', ['min']); $this->emit('InfoChecker', 'missingRequirement', ['min']);
} }
if (isset($info['dependencies']['owncloud']['@attributes']['max-version']) && $info['requiremax']) { if (isset($info['dependencies']['owncloud']['@attributes']['max-version']) && isset($info['requiremax'])) {
$this->emit('InfoChecker', 'duplicateRequirement', ['max']); $this->emit('InfoChecker', 'duplicateRequirement', ['max']);
$errors[] = [ $errors[] = [
'type' => 'duplicateRequirement', 'type' => 'duplicateRequirement',