I don't really think there can be an error in the qa_get_max_upload_size(). Indeed the $minphp variable can have a string such as "xM". The thing is that given the dynamic nature of the PHP language, it manages to juggle with the types and perform a string to number conversion. In short, it takes all digits up to the G/M/K and then multiplies it by 1024.
Indeed it is a bit dirty, IMO, but I don't really think it can result in any bug (or at least I can't think of any input that would break the function and generate an unexpected result).
In fact, PHP guys actually suggested a very similar approach.
There is just a silly thing, though (which even happens on the approach suggested in the documentation). The output value of that function can be either a (numeric) string or a number. In general, this shouldn't be an issue (because of the type juggling) but it can be prevented by casting it before returning the value.