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
|
|
@ -215,7 +215,7 @@ final class AccountingController
|
|||
if (($f['error'] ?? UPLOAD_ERR_NO_FILE) !== UPLOAD_ERR_OK || ($f['size'] ?? 0) > 20 * 1024 * 1024) {
|
||||
throw new RuntimeException(t('accounting.document_invalid'));
|
||||
}
|
||||
$mime = new finfo(FILEINFO_MIME_TYPE)->file($f['tmp_name']);
|
||||
$mime = (new finfo(FILEINFO_MIME_TYPE))->file($f['tmp_name']);
|
||||
$ext =
|
||||
['application/pdf' => 'pdf', 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/webp' => 'webp'][$mime] ??
|
||||
null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue