Fix "Undefined index" when the values do not exist

This commit is contained in:
Joas Schilling 2016-08-18 11:51:43 +02:00
parent 5b6b9ad1ff
commit 91fbf815f9
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
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',