Skip to content

Commit 4844ca6

Browse files
author
Julien Veyssier
authored
Merge pull request #34353 from nextcloud/fix/noid/reference-url-fallback
Reference url can always fallback to the link itself
2 parents b701e19 + eff7837 commit 4844ca6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/public/Collaboration/Reference/IReference.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function setUrl(?string $url): void;
9898
/**
9999
* @since 25.0.0
100100
*/
101-
public function getUrl(): ?string;
101+
public function getUrl(): string;
102102

103103
/**
104104
* Set the reference specific rich object representation

lib/public/Collaboration/Reference/Reference.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ public function setUrl(?string $url): void {
149149
* @inheritdoc
150150
* @since 25.0.0
151151
*/
152-
public function getUrl(): ?string {
153-
return $this->url;
152+
public function getUrl(): string {
153+
return $this->url ?? $this->reference;
154154
}
155155

156156
/**

0 commit comments

Comments
 (0)