]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check if elements are set in installer 14813/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 22 Mar 2019 15:54:35 +0000 (16:54 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 22 Mar 2019 15:54:35 +0000 (16:54 +0100)
Since we now have all the apps from the appstore we need to do a bit
more checking.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Installer.php

index dc1110c04960369e6a59b74783e4203a46486ea3..a410c6a011fc4d475564260cbc0ea0062fd5e86c 100644 (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;