error on file validation

Created on 28 March 2024, 8 months ago
Updated 19 May 2024, 6 months ago

Problem/Motivation

Not sure why I'm the only one but I'm getting below error:

TypeError: Drupal\file\Upload\FileUploadHandler::handleExtensionValidation(): Return value must be of type string, null returned in Drupal\file\Upload\FileUploadHandler->handleExtensionValidation() (line 360 of /core/modules/file/src/Upload/FileUploadHandler.php).

as soon as I add "pdf" to file_validate_extensions it works fine
line 199 /modules/contrib/file_management/src/Form/FileManagementEditFileForm.php: $new_file = file_save_upload('new_file', ['file_validate_extensions' => ['pdf']]);

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States demmodann

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024