Thanks. Just to clarify, I believe that if someone posts code snippets like this, purporting to do thing X by doing roundabout and overly simplistic thing Y, you really have to own it and assume tons of responsibility for misleading fellow developers who may be unaware of possible edge cases. When somebody copy-pastes a quick solution and it doesn't work for literally everybody, that translates to real people getting a bad deal when they hit your bugs, something we should all as responsible developers seek to avoid.
And yeah, I will not waste time being tactful when describing this situation, because I have seen it before and it kind of sucks.