From 91fbf815f9080905e6be2235ebc1b231e83cbd38 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 18 Aug 2016 11:51:43 +0200 Subject: [PATCH] Fix "Undefined index" when the values do not exist --- lib/private/App/CodeChecker/InfoChecker.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/App/CodeChecker/InfoChecker.php b/lib/private/App/CodeChecker/InfoChecker.php index 3ee99dc647..77bf7e8182 100644 --- a/lib/private/App/CodeChecker/InfoChecker.php +++ b/lib/private/App/CodeChecker/InfoChecker.php @@ -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',