Преглед на файлове

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>
undefined
Joas Schilling преди 2 месеца
родител
ревизия
1cf2bed55c
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2
    2
      apps/files_sharing/lib/Controller/ShareAPIController.php

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

Loading…
Отказ
Запис