#3119 closed defect (bug) (duplicate)
Avatar uploads do not accept files with uppercase extensions.
Reported by: | CPilko | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
Attempting to upload a valid file with an uppercase extension gives an error "Please upload only JPG, GIF or PNG photos."
Line 525 of /bp-core/bp-core-avatars.php should be changed from:
if ( ( !empty( $file['file']['type'] ) && !preg_match('/(jpe?g|gif|png)$/', $file['file']['type'] ) ) || !preg_match( '/(jpe?g|gif|png)$/', $file['file']['name'] ) )
to a case insensitive preg_match.
if ( ( !empty( $file['file']['type'] ) && !preg_match('/(jpe?g|gif|png)$/i', $file['file']['type'] ) ) || !preg_match( '/(jpe?g|gif|png)$/i', $file['file']['name'] ) )
Change History (2)
Note: See
TracTickets for help on using
tickets.
Duplicate of #3087.