Skip to content

Commit 1539611

Browse files
nickvergessennfebe
authored andcommitted
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 <[email protected]>
1 parent 36d1d3b commit 1539611

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
@@ -649,8 +649,8 @@ public function createShare(
649649
//Expire date
650650
if ($expireDate !== '') {
651651
try {
652-
$expireDate = $this->parseDate($expireDate);
653-
$share->setExpirationDate($expireDate);
652+
$expireDateTime = $this->parseDate($expireDate);
653+
$share->setExpirationDate($expireDateTime);
654654
} catch (\Exception $e) {
655655
throw new OCSNotFoundException($this->l->t('Invalid date, date format must be YYYY-MM-DD'));
656656
}

0 commit comments

Comments
 (0)