I'm fairly sure this has been discussed here in the past. The OP answered their own question with a code which has a few issues (two are serious, but not related to the asked topic, they are general). I didn't know what to do, hence I've suggested edit and for the OP added comment that contains link to that review, because such suggestions should be declined (which correctly happened).
What should I do in this case?
Should I post my own answer based on the OP's answer with fixed issues (which are not specific to the asked topic)?