Skip to content

Commit

Permalink
Merge pull request #12247 from nextcloud/bugfix/noid/avoid-changing-t…
Browse files Browse the repository at this point in the history
…ypes

fix(API): Avoid changing variable types
  • Loading branch information
danxuliu authored May 2, 2024
2 parents 9d9c751 + 6387dcf commit acb1bbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Share/Helper/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public function createShare(IShare $share, string $shareWith, int $permissions,

if ($expireDate !== '') {
try {
$expireDate = $this->parseDate($expireDate);
$share->setExpirationDate($expireDate);
$expireDateTime = $this->parseDate($expireDate);
$share->setExpirationDate($expireDateTime);
} catch (\Exception $e) {
throw new OCSNotFoundException($this->l->t('Invalid date, date format must be YYYY-MM-DD'));
}
Expand Down

0 comments on commit acb1bbe

Please sign in to comment.