summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-04-03 13:32:50 +0200
committerGitHub <noreply@github.com>2018-04-03 13:32:50 +0200
commit75cf631fd6a6124f98c32d4dd7de4749a4f04378 (patch)
tree73232c6bdfaaebe48ee2fe1c49756ba4062ac2f9 /lib
parentbd8352d4c4aa1d350ae6b6620452952b7b11b311 (diff)
parenteb6e5a27a34060b7e410fd8013ce12134cda7f68 (diff)
downloadnextcloud-server-75cf631fd6a6124f98c32d4dd7de4749a4f04378.tar.gz
nextcloud-server-75cf631fd6a6124f98c32d4dd7de4749a4f04378.zip
Merge pull request #9008 from nextcloud/disable-if-no-appinfo
Do not fail hard if no appinfo is returned during update
Diffstat (limited to 'lib')
-rw-r--r--lib/private/App/AppManager.php6
-rw-r--r--lib/private/Updater.php2
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php
index 442fc1a0e1b..4d0859b1988 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -358,7 +358,7 @@ class AppManager implements IAppManager {
*
* @param bool $path
* @param null $lang
- * @return array app info
+ * @return array|null app info
*/
public function getAppInfo(string $appId, bool $path = false, $lang = null) {
if ($path) {
@@ -411,7 +411,9 @@ class AppManager implements IAppManager {
$incompatibleApps = array();
foreach ($apps as $appId) {
$info = $this->getAppInfo($appId);
- if (!\OC_App::isAppCompatible($version, $info)) {
+ if ($info === null) {
+ $incompatibleApps[] = ['id' => $appId];
+ } else if (!\OC_App::isAppCompatible($version, $info)) {
$incompatibleApps[] = $info;
}
}
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 4dc8edc0272..49a4a1094ed 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -391,7 +391,7 @@ class Updater extends BasicEmitter {
foreach ($apps as $app) {
// check if the app is compatible with this version of ownCloud
$info = OC_App::getAppInfo($app);
- if(!OC_App::isAppCompatible($version, $info)) {
+ if($info === null || !OC_App::isAppCompatible($version, $info)) {
if ($appManager->isShipped($app)) {
throw new \UnexpectedValueException('The files of the app "' . $app . '" were not correctly replaced before running the update');
}