Catch exceptions during app upgrade - fixes #16240

This commit is contained in:
Thomas Müller 2015-10-09 13:44:30 +02:00
parent a42dd117e2
commit 38143d670b
1 changed files with 8 additions and 4 deletions

View File

@ -497,11 +497,15 @@ class Updater extends BasicEmitter {
*/ */
private function upgradeAppStoreApps(array $disabledApps) { private function upgradeAppStoreApps(array $disabledApps) {
foreach($disabledApps as $app) { foreach($disabledApps as $app) {
if (OC_Installer::isUpdateAvailable($app)) { try {
$ocsId = \OC::$server->getConfig()->getAppValue($app, 'ocsid', ''); if (OC_Installer::isUpdateAvailable($app)) {
$ocsId = \OC::$server->getConfig()->getAppValue($app, 'ocsid', '');
$this->emit('\OC\Updater', 'upgradeAppStoreApp', array($app)); $this->emit('\OC\Updater', 'upgradeAppStoreApp', array($app));
OC_Installer::updateAppByOCSId($ocsId); OC_Installer::updateAppByOCSId($ocsId);
}
} catch (\Exception $ex) {
$this->log->logException($ex, ['app' => 'core']);
} }
} }
} }