fix(carddav): IAddressBook::getKey() should return a string

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
pull/54650/head
Richard Steinmetz 4 months ago
parent 5ab16f46f9
commit caf664ea43
No known key found for this signature in database
GPG Key ID: 27137D9E7D273FB2
  1. 2
      apps/dav/lib/CardDAV/AddressBookImpl.php
  2. 3
      apps/dav/tests/unit/CardDAV/AddressBookImplTest.php

@ -41,7 +41,7 @@ class AddressBookImpl implements IAddressBookEnabled {
* @since 5.0.0
*/
public function getKey() {
return $this->addressBookInfo['id'];
return (string)$this->addressBookInfo['id'];
}
/**

@ -53,7 +53,8 @@ class AddressBookImplTest extends TestCase {
}
public function testGetKey(): void {
$this->assertSame($this->addressBookInfo['id'],
$this->assertIsString($this->addressBookImpl->getKey());
$this->assertSame((string)$this->addressBookInfo['id'],
$this->addressBookImpl->getKey());
}

Loading…
Cancel
Save