Opened 15 years ago
Closed 14 years ago
#2206 closed defect (bug) (fixed)
strange avatars break uploads
Reported by: | luccame | Owned by: | |
---|---|---|---|
Milestone: | 1.2.4 | Priority: | major |
Severity: | Version: | ||
Component: | Core | Keywords: | avatar upload |
Cc: |
Description
if you try to upload an avatar 1px width * 451px height it fails and go on a blank screen without warning or errors.
1px width * <451px height : works
1px width * 451px height : works
1px width * >=451px height : fails
DJPaul said: in your bug report mention BP_AVATAR_ORIGINAL_MAX_WIDTH in bp-core-avatars.php
Change History (5)
Note: See
TracTickets for help on using
tickets.
From Phlux0r
Looks like in BuddyPress 1.2.3 the avatar size check is not compatible with the WordPress thumbnailing function.
If you look in bp-code/bp-core-avatars.php, function: bp_core_avatar_handle_upload()
there is a getimagesize() call. That actually returns an array, not a single value so the if statement will not evaluate correctly and the code will always attempt to create a thumbnail. If that fails, the wp_create_thumbnail() function returns a WP_Error object, hence the message some are getting.
here’s my modded code to fix this issue:
HTH