You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For PHP 8.1 FileHelper::getMimeType always return null for UploadedFile and validate return false.
Because UploadedFile dont have extension, see FileHelper::getMimeType method
if (PHP_VERSION_ID >= 80100) {
return static::getMimeTypeByExtension($file, $magicFile);
}
For PHP 8.1 FileHelper::getMimeType always return null for UploadedFile and validate return false.
Because UploadedFile dont have extension, see FileHelper::getMimeType method
and see
FileValidator::validateExtension method:
What steps will reproduce the problem?
Use rule for UploadedFile
and upload png, jpg or webp file
What is the expected result?
validate true
What do you get instead?
validate false
Error: Only files with these extensions are allowed: png, jpg, webp.
Additional info
The text was updated successfully, but these errors were encountered: