Skip to content

Commit d9f7b73

Browse files
authored
Merge pull request #2117 from nextcloud/backport/2094/stable30
[stable30] fix: ignore empty expiration date
2 parents 45f9933 + 664427a commit d9f7b73

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Model/ShareWrapper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,10 @@ public function import(array $data): IDeserializable {
499499
$this->importAttributesFromDatabase($this->get('attributes', $data));
500500

501501
try {
502-
$this->setExpirationDate(new DateTime($this->get('expiration', $data)));
502+
$expirationDate = $this->get('expiration', $data);
503+
if ($expirationDate !== '') {
504+
$this->setExpirationDate(new DateTime($expirationDate));
505+
}
503506
} catch (\Exception $e) {
504507
}
505508

0 commit comments

Comments
 (0)