Rétablir la compatibilité avec PHP 8.2

This commit is contained in:
Alexandre NOEL 2026-09-03 22:43:59 +02:00
commit 63224d8b06
12 changed files with 16 additions and 16 deletions

View file

@ -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
{