Fix "Undefined index" when the values do not exist

This commit is contained in:
Joas Schilling 2016-08-18 12:10:26 +02:00
parent 2d025db018
commit f7092c981f
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');
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']);
$errors[] = [
'type' => 'duplicateRequirement',
@ -90,7 +90,7 @@ class InfoChecker extends BasicEmitter {
$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']);
$errors[] = [
'type' => 'duplicateRequirement',