Skip to content

Commit

Permalink
fix(sharing): Don't change the type of the controller argument
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
nickvergessen authored and Fenn-CS committed Apr 20, 2024
1 parent 7daa662 commit 396244f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ public function createShare(
//Expire date
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 396244f

Please sign in to comment.