Merge pull request #54650 from nextcloud/fix/carddav/get-key-string

fix(carddav): IAddressBook::getKey() should return a string
This commit is contained in:
Richard Steinmetz 2025-08-26 14:20:53 +02:00 committed by GitHub
commit 38c8ea75ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

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

View file

@ -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());
}