diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-02-17 15:57:37 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-02-17 17:26:18 +0100 |
commit | 1bb5314491c50579eebc9eb325417232c65a580c (patch) | |
tree | f318134d4999a7f868c54d5d20cda8236ef69fe2 | |
parent | 8f499b9c8af15cbb9315a7f4cbdc3f97577f7863 (diff) | |
download | nextcloud-server-1bb5314491c50579eebc9eb325417232c65a580c.tar.gz nextcloud-server-1bb5314491c50579eebc9eb325417232c65a580c.zip |
compatibility to Nc 19
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r-- | lib/private/Repair.php | 2 | ||||
-rw-r--r-- | lib/private/Repair/RepairDavShares.php | 4 | ||||
-rw-r--r-- | tests/lib/Repair/RepairDavSharesTest.php | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Repair.php b/lib/private/Repair.php index a54f5889587..b5e093765fd 100644 --- a/lib/private/Repair.php +++ b/lib/private/Repair.php @@ -157,7 +157,7 @@ class Repair implements IOutput { new RemoveLinkShares(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig(), \OC::$server->getGroupManager(), \OC::$server->getNotificationManager(), \OC::$server->query(ITimeFactory::class)), new ClearCollectionsAccessCache(\OC::$server->getConfig(), \OC::$server->query(IManager::class)), \OC::$server->query(ResetGeneratedAvatarFlag::class), - \OC::$server->get(RepairDavShares::class) + \OC::$server->query(RepairDavShares::class) ]; } diff --git a/lib/private/Repair/RepairDavShares.php b/lib/private/Repair/RepairDavShares.php index 64104c1e28a..5c5ac4959b8 100644 --- a/lib/private/Repair/RepairDavShares.php +++ b/lib/private/Repair/RepairDavShares.php @@ -25,7 +25,7 @@ declare(strict_types=1); namespace OC\Repair; -use OCP\DB\Exception; +use Doctrine\DBAL\DBALException; use OCP\IConfig; use OCP\IDBConnection; use OCP\IGroupManager; @@ -112,7 +112,7 @@ class RepairDavShares implements IRepairStep { ->setParameter('shareId', $share['id']) ->execute(); $this->logger->info('Repaired principal for dav share {id} from {old} to {new}', $logParameters); - } catch (Exception $e) { + } catch (DBALException $e) { $logParameters['message'] = $e->getMessage(); $logParameters['exception'] = $e; $this->logger->info('Could not repair principal for dav share {id} from {old} to {new}: {message}', $logParameters); diff --git a/tests/lib/Repair/RepairDavSharesTest.php b/tests/lib/Repair/RepairDavSharesTest.php index 199a9a101ea..ad18409a888 100644 --- a/tests/lib/Repair/RepairDavSharesTest.php +++ b/tests/lib/Repair/RepairDavSharesTest.php @@ -25,8 +25,8 @@ declare(strict_types=1); namespace Test\Repair; +use Doctrine\DBAL\Driver\Statement; use OC\Repair\RepairDavShares; -use OCP\DB\IResult; use OCP\DB\QueryBuilder\IExpressionBuilder; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IConfig; @@ -130,7 +130,7 @@ class RepairDavSharesTest extends TestCase { ], ]; - $shareResults = $this->createMock(IResult::class); + $shareResults = $this->createMock(Statement::class); $shareResults->expects($this->any()) ->method('fetch') ->willReturnCallback(function () use (&$shareResultData) { |