diff --git a/lib/Share/Helper/ShareAPIController.php b/lib/Share/Helper/ShareAPIController.php index 3e3a51ea460..8b215be2c53 100644 --- a/lib/Share/Helper/ShareAPIController.php +++ b/lib/Share/Helper/ShareAPIController.php @@ -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')); }