Merge pull request #54652 from nextcloud/backport/54650/stable31

[stable31] fix(carddav): IAddressBook::getKey() should return a string
pull/54602/head
Andy Scherzinger 2025-08-26 21:56:03 +07:00 committed by GitHub
commit 7ffa256267
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

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

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