From 1cf2bed55c9f3cf142fd2beacffce31d36d10401 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 18 Apr 2024 14:31:45 +0200 Subject: [PATCH] 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 --- apps/files_sharing/lib/Controller/ShareAPIController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 63e124a909f..cdf370c82fd 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -649,8 +649,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')); }