Skip to content

Commit 21b237f

Browse files
committed
fix(carddav): IAddressBook::getKey() should return a string
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
1 parent 5ce2cf1 commit 21b237f

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)