Merge pull request #39132 from nextcloud/fix/correct-exceptions-for-SAB

fix(CardDAV): catch right exception when checking for federated app classes
This commit is contained in:
Arthur Schiwon 2023-07-14 19:30:42 +02:00 committed by GitHub
commit 27f76dc522
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View file

@ -107,7 +107,7 @@ class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome {
try {
$trustedServers = \OC::$server->get(TrustedServers::class);
$request = \OC::$server->get(IRequest::class);
} catch (NotFoundExceptionInterface | ContainerExceptionInterface $e) {
} catch (QueryException | NotFoundExceptionInterface | ContainerExceptionInterface $e) {
// nothing to do, the request / trusted servers don't exist
}
if ($addressBook['principaluri'] === 'principals/system/system') {

View file

@ -59,7 +59,6 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
* @psalm-template S as class-string<T>|string
* @psalm-param S $id
* @psalm-return (S is class-string<T> ? T : mixed)
* @throws QueryException
*/
public function get(string $id) {
return $this->query($id);