Skip to content

Commit 490f545

Browse files
committed
fix(sharing): Don't change the type of the controller argument
[EA] New value type (\DateTime) is not matching the resolved parameter type and might introduce types-related false-positives. Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 78cef3b commit 490f545

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,8 @@ public function createShare(
648648
//Expire date
649649
if ($expireDate !== '') {
650650
try {
651-
$expireDate = $this->parseDate($expireDate);
652-
$share->setExpirationDate($expireDate);
651+
$expireDateTime = $this->parseDate($expireDate);
652+
$share->setExpirationDate($expireDateTime);
653653
} catch (\Exception $e) {
654654
throw new OCSNotFoundException($this->l->t('Invalid date, date format must be YYYY-MM-DD'));
655655
}

0 commit comments

Comments
 (0)