I got this error on the latest version, the potential fix link in the last post didn’t work. Fiddled with it for a while and managed to fix it. Here you go:
https://www.entertainingcode.com/archives/wordpress-image-upload-bug-fixed/
The cause of it is your php installation being done with --disable-ctype
, and wordpress using a ctype function (just like the problem back in 2.5).