Merge pull request #16414 from nextcloud/backport/15606/stable16
[stable16] Add catch for RuntimeException
This commit is contained in:
commit
ef25d464a4
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue