Skip to content

Commit caf664e

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

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
@@ -41,7 +41,7 @@ public function __construct(
4141
* @since 5.0.0
4242
*/
4343
public function getKey() {
44-
return $this->addressBookInfo['id'];
44+
return (string)$this->addressBookInfo['id'];
4545
}
4646

4747
/**

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

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

5555
public function testGetKey(): void {
56-
$this->assertSame($this->addressBookInfo['id'],
56+
$this->assertIsString($this->addressBookImpl->getKey());
57+
$this->assertSame((string)$this->addressBookInfo['id'],
5758
$this->addressBookImpl->getKey());
5859
}
5960

0 commit comments

Comments
 (0)