Merge pull request #44917 from nextcloud/backport/44916/stable29

[stable29] fix(sharing): Don't change the type of the controller argument
This commit is contained in:
Joas Schilling 2024-04-18 16:27:59 +02:00 committed by GitHub
commit 896c115a81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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'));
}