Most likely you should blame a PHP configuration.
As you said "nothing happens" I bet the post_max_size or maybe upload_max_filesize are to blame. Take these values from the phpinfo() output or php.ini file. Compare those limits with the size of the image you're trying to upload and make the appropriate changes.
Note the size of an HTTP post is not the same as the size of the attached file while the upload size should match the size of the attached file.
Additional detail: Without overcomplicating things too much I can think of the following scenarios, assuming upload_max_filesize and post_max_size are configured in a way that makes sense (EG: upload_max_filesize should be smaller than post_max_size... even if they were equal it wouldn't make sense):
-
Uploaded file size <= upload_max_filesize (arguably assuming the HTTP request size <= post_max_size)
-
$_FILE array is set and contains
-
size: The size of the file
-
error: 0
-
$_POST array is set and contains all the needed variables
-
Uploaded file size > upload_max_filesize (arguably assuming the HTTP request size <= post_max_size)
-
$_FILE array is set and contains
-
$_POST array is set and contains all the needed variables
-
HTTP request size > post_max_size (arguably assuming the uploaded file size, if any > upload_max_filesize)
-
$_FILE array is not set
-
$_POST array is not set
I guess any other scenario doesn't make much sense to consider or to take any particular action.
I've created this pull request https://github.com/q2a/question2answer/pull/57 with all the changes performed in the code to handle this situation in the account page and in the admin page (uploading a default avatar). You can give them a try by backing up those for files and then replacing them with the ones of the pull request. Then track the pull request for feedback on it and, of course, let me know if you have any issue with it.