- Issue created by @elc
- 🇮🇳India sourav_paul Kolkata
I've reviewed the MR !6,
Its applied cleanly & fixed the issue.
Attaching SS:
Before:
After:
Hence moving it to RTBC
Automatically closed - issue fixed for 2 weeks with no activity.
Attempting to upload a file using Drupal 10.2.2 or later throws an error:
TypeError: Drupal\file\Upload\FileUploadHandler::handleExtensionValidation(): Return value must be of type string, null returned in Drupal\file\Upload\FileUploadHandler->handleExtensionValidation() (line 431 of /web/core/modules/file/src/Upload/FileUploadHandler.php).
This appears to have changed in this commit:
📌
Move file upload validation from file.module to constraint validators
Fixed
The regression was noticed here:
🐛
file_save_upload broken by 10.2.x
Needs work
NB: This behaviour may change again in the future: : 📌 Simplify how 'allow all extensions' file upload validation works Active
On the 2.0.x branch only, change the validators used when calling file_save_upload
:
// Import the uploaded verification file.
- $validators = ['file_validate_extensions' => []];
+ $validators = ['file_validate_extensions' => ''];
if ($file = file_save_upload('file_upload', $validators, FALSE, 0, FileSystemInterface::EXISTS_REPLACE)) {
This has been fixed in 📌 Automated Drupal 11 compatibility fixes for site_verify RTBC by using the FileExtension constraint validator for versions D10.2.2 and above.
None.
None.
None.
Active
2.0
Code
I've reviewed the MR !6,
Its applied cleanly & fixed the issue.
Attaching SS:
Before:
After:
Hence moving it to RTBC
Automatically closed - issue fixed for 2 weeks with no activity.