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>
pull/44916/head
Joas Schilling 1 month ago
parent 78cef3b0e0
commit 490f545006
No known key found for this signature in database
GPG Key ID: C400AAF20C1BB6FC

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

Loading…
Cancel
Save