Merge pull request #14813 from nextcloud/fix/sentry/unset

Check if elements are set in installer
This commit is contained in:
Morris Jobke 2019-03-25 08:57:34 +01:00 committed by GitHub
commit 8432583dc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -391,6 +391,10 @@ class Installer {
foreach($this->apps as $app) {
if($app['id'] === $appId) {
$currentVersion = OC_App::getAppVersion($appId);
if (!isset($app['releases'][0]['version'])) {
return false;
}
$newestVersion = $app['releases'][0]['version'];
if ($currentVersion !== '0' && version_compare($newestVersion, $currentVersion, '>')) {
return $newestVersion;