Yeah you don’t want to make changes to any core files, not recommended. What that particular line is checking for is whether or not there is an error and whether or not the file is actually an image.
So if the line is returning true, then the best thing to do would be to put the site in maintenance mode, and then test further. For example, the first thing to look at would be the error, which you can do by adding this code to line #857, right after the media_handle_upload() line:
die(var_dump($attach_id));
If there is an error, that will tell you what it is. Otherwise, it will tell you the value of the $attach_id variable, which may help to understand what is happening.
That is not an error, so if your reporting is correct then the only other possibility is that the upload is failing at the check to see if the file is an actual image.
From here, it’s really just a matter of troubleshooting to determine what’s happening. Things to look at include:
– Different types of images
– Different sizes of images
– Different USP settings
– Server settings
– Folder permissions for uploads
..and things like that. I also would recommend setting up a default install of WP without making any changes or installing any other plugins. Then try USP and the image uploads again. That way you’ll eliminate a lot of other variables (like plugins, theme, settings, etc.).
Hi Zerquix18, I hope you got this sorted out. I’m gonna go ahead and mark this topic as resolved to help keep things organized. Feel free to follow-up or post afresh with any new issues or questions, I’m glad to help however possible. Thank you.