Skip to content

Commit f5bbf82

Browse files
authored
Merge pull request #933 from nextcloud/backport-930-check-isset-require-9
[stable9] Fix "Undefined index" when the values do not exist
2 parents 2d025db + f7092c9 commit f5bbf82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/private/app/codechecker/infochecker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function analyse($appId) {
8080

8181
$info = $this->infoParser->parse($appPath . '/appinfo/info.xml');
8282

83-
if (isset($info['dependencies']['owncloud']['@attributes']['min-version']) && ($info['requiremin'] || $info['require'])) {
83+
if (isset($info['dependencies']['owncloud']['@attributes']['min-version']) && (isset($info['requiremin']) || isset($info['require']))) {
8484
$this->emit('InfoChecker', 'duplicateRequirement', ['min']);
8585
$errors[] = [
8686
'type' => 'duplicateRequirement',
@@ -90,7 +90,7 @@ public function analyse($appId) {
9090
$this->emit('InfoChecker', 'missingRequirement', ['min']);
9191
}
9292

93-
if (isset($info['dependencies']['owncloud']['@attributes']['max-version']) && $info['requiremax']) {
93+
if (isset($info['dependencies']['owncloud']['@attributes']['max-version']) && isset($info['requiremax'])) {
9494
$this->emit('InfoChecker', 'duplicateRequirement', ['max']);
9595
$errors[] = [
9696
'type' => 'duplicateRequirement',

0 commit comments

Comments
 (0)