I am having an issue with uploading cover photos to my BuddyPress website.
Whenever I try to upload a new image for the cover photo, I get this error:
Fatal error: Cannot use object of type WP_Error as array in /****/*****/public_html/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php on line 924.
I have contacted the theme developer and wrote this message.
When I navigate to wpcontent/plugin/gears/modules/bp-cover-photo/index.php.
This code shows that the max width is 1140, width is 452.
* Define global configurations
When I upload a cover photo that is larger than the max width and height above, I get this error.
Fatal error: Cannot use object of type WP_Error as array in /*****/*****/public_html/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php on line 924.
What I would want to happen is when someone uploads a image that is above the max width and height, I would want to prevent the above error message from showing and show a much more user friendly message such as: The image you upload is above the max height and width, Please upload a image that is within max width 1140 * 452.
Theme developer responded with this message:
The constant variables that are defined below are a just declaration and have nothing to do with the error.
The error message is misleading and does not contain any useful information. I have tested your site by uploading a test image in the media manager and the BuddyPress profile photo uploader, and it returns two different errors, one 'Http Error' and the other is 'Stack Overflow or Memory issue' issue.
Theme developer suggested these solutions to resolve the issue:
There are things that you could try to resolve this:
1. Increase the max execution time in your PHP ini configuration to 0 (unlimited)
2. Increase the memory allocation (e.g. max_memory)
3. Make sure your GD and Imagegick PHP extensions are up to date.
4. After modifying the changes above, please do restart your server for this changes to take effect.
I have done these but the issue is still there.
Am using BuddyPress Version 2.6.2 and php 5.6.21.
I would really want to resolve this issue, so all help is welcome.