Opened 8 years ago
Last modified 8 years ago
#7943 new defect (bug)
Cannot use object of type WP_Error as array bp_core_avatar_handle_upload line 923
| Reported by: | kunleodusan | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Contributions |
| Component: | Media | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Once in a while, this error is thrown when a user uploads an avatar image.
Here's the suggested reason for error (Note comments):
Code highlighting:
$bp->avatar_admin->resized = $avatar_attachment->shrink( $bp->avatar_admin->original['file'], $ui_available_width ); //@return false|string|WP_Image_Editor|WP_Error $bp->avatar_admin->image = new stdClass(); // We only want to handle one image after resize. if ( empty( $bp->avatar_admin->resized ) ) { $bp->avatar_admin->image->file = $bp->avatar_admin->original['file']; $bp->avatar_admin->image->dir = str_replace( $upload_path, '', $bp->avatar_admin->original['file'] ); } else { $bp->avatar_admin->image->file = $bp->avatar_admin->resized['path']; //Error cause if WP_Error is thrown.
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)