Skip to content

Commit 65250e5

Browse files
authored
Merge pull request #54651 from nextcloud/backport/54650/stable30
[stable30] fix(carddav): IAddressBook::getKey() should return a string
2 parents 5ce2cf1 + 21b237f commit 65250e5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

apps/dav/lib/CardDAV/AddressBookImpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function __construct(
6666
* @since 5.0.0
6767
*/
6868
public function getKey() {
69-
return $this->addressBookInfo['id'];
69+
return (string) $this->addressBookInfo['id'];
7070
}
7171

7272
/**

apps/dav/tests/unit/CardDAV/AddressBookImplTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ protected function setUp(): void {
6767
}
6868

6969
public function testGetKey(): void {
70-
$this->assertSame($this->addressBookInfo['id'],
70+
$this->assertIsString($this->addressBookImpl->getKey());
71+
$this->assertSame((string) $this->addressBookInfo['id'],
7172
$this->addressBookImpl->getKey());
7273
}
7374

0 commit comments

Comments
 (0)