Catch exceptions during app upgrade - fixes #16240
This commit is contained in:
parent
a42dd117e2
commit
38143d670b
|
@ -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']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue