since you must test the ['error'] element of the uploaded file information, before using any of the file data for a correctly uploaded file, you would test the ['error'] value to see if no file was selected - UPLOAD_ERR_NO_FILE (Value: 4), to skip the file processing code.
your post method form processing code should detect if a post method form was submitted, then test if both the $_POST and $_FILES arrays are empty. if they are, this indicates that the total size of the form data exceeded the post_max_size setting. in this case, you would setup a message for the user letting them know that the form data was too large (likely due to the size of the uploaded file) and could not be processed. after you have detected that there is form data, you would test the ['error'] element of the uploaded field information, then proceed based on which value it is. for errors that the user has control over, you would setup and display unique and helpful error messages. for errors that the user doesn't have any control over, you would setup a generic failure message for the user and log the actual error information so that you know what is causing uploads to fail.