Skip to content

Commit 3dba40d

Browse files
committed
Fix "Undefined index" when the values do not exist
1 parent 5580a77 commit 3dba40d

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)