Rétablir la compatibilité avec PHP 8.2
This commit is contained in:
parent
9a2b4068da
commit
63224d8b06
12 changed files with 16 additions and 16 deletions
|
|
@ -288,7 +288,7 @@ final class MedicalDocumentsController
|
|||
if (($f['error'] ?? 1) !== UPLOAD_ERR_OK || ($f['size'] ?? 0) <= 0 || $f['size'] > self::MAX_BYTES) {
|
||||
throw new RuntimeException(t('medical_document.file_invalid'));
|
||||
}
|
||||
$mime = new finfo(FILEINFO_MIME_TYPE)->file($f['tmp_name']);
|
||||
$mime = (new finfo(FILEINFO_MIME_TYPE))->file($f['tmp_name']);
|
||||
if (!isset(self::TYPES[$mime])) {
|
||||
throw new RuntimeException(t('medical_document.file_type'));
|
||||
}
|
||||
|
|
@ -319,7 +319,7 @@ final class MedicalDocumentsController
|
|||
}
|
||||
private static function fr(string $date): string
|
||||
{
|
||||
return new DateTimeImmutable($date)->format('d/m/Y');
|
||||
return (new DateTimeImmutable($date))->format('d/m/Y');
|
||||
}
|
||||
private static function fail(string $message): void
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue