diff options
author | Joas Schilling <coding@schilljs.com> | 2024-04-18 14:31:45 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-04-18 14:31:45 +0200 |
commit | 490f545006024ad982c801b5c986ff8d03826821 (patch) | |
tree | b51c3fa707034da1786f3613067f8250371a9924 /apps | |
parent | 78cef3b0e0e0b02795d7f81b13b808114dc8fba8 (diff) | |
download | nextcloud-server-490f545006024ad982c801b5c986ff8d03826821.tar.gz nextcloud-server-490f545006024ad982c801b5c986ff8d03826821.zip |
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>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index fa0e2d56007..1bdcee11c45 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -648,8 +648,8 @@ class ShareAPIController extends OCSController { //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')); } |