Skip to content

Commit

Permalink
compatibility to Nc 20
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed Feb 17, 2021
1 parent ca7a7a5 commit c882bc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/private/Repair/RepairDavShares.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

namespace OC\Repair;

use OCP\DB\Exception;
use Doctrine\DBAL\DBALException;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\IGroupManager;
Expand Down Expand Up @@ -112,7 +112,7 @@ protected function repairUnencodedGroupShares() {
->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);
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/Repair/RepairDavSharesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

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;
Expand Down Expand Up @@ -130,7 +130,7 @@ public function testRun() {
],
];

$shareResults = $this->createMock(IResult::class);
$shareResults = $this->createMock(Statement::class);
$shareResults->expects($this->any())
->method('fetch')
->willReturnCallback(function () use (&$shareResultData) {
Expand Down

0 comments on commit c882bc6

Please sign in to comment.