Skip to content

Commit

Permalink
Merge pull request #933 from nextcloud/backport-930-check-isset-requi…
Browse files Browse the repository at this point in the history
…re-9

[stable9] Fix "Undefined index" when the values do not exist
  • Loading branch information
MorrisJobke authored Aug 18, 2016
2 parents 2d025db + f7092c9 commit f5bbf82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/app/codechecker/infochecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function analyse($appId) {

$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',
Expand All @@ -90,7 +90,7 @@ public function analyse($appId) {
$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',
Expand Down

0 comments on commit f5bbf82

Please sign in to comment.