Merge pull request #16414 from nextcloud/backport/15606/stable16

[stable16] Add catch for RuntimeException
This commit is contained in:
Morris Jobke 2019-07-16 13:34:08 +02:00 committed by GitHub
commit ef25d464a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,7 @@ use OCP\IConfig;
use OCP\ILogger;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
use RuntimeException;
/**
* Class CleanupCardDAVPhotoCache
@ -65,6 +66,9 @@ class CleanupCardDAVPhotoCache implements IRepairStep {
$folders = $this->appData->getDirectoryListing();
} catch (NotFoundException $e) {
return;
} catch (RuntimeException $e) {
$this->logger->logException($e, ['message' => 'Failed to fetch directory listing in CleanupCardDAVPhotoCache']);
return;
}
$folders = array_filter($folders, function (ISimpleFolder $folder) {