Merge pull request #15606 from nextcloud/fix/15605/add-catch-for-runtime-exception

Add catch for RuntimeException
This commit is contained in:
Roeland Jago Douma 2019-07-16 08:05:11 +02:00 committed by GitHub
commit d0e1bcc1d0
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) {