I think editing away errors in people's question's code is not a good idea.
And here is what I wrote in the comments to the person who self-identified as the one who made the edit:
@... Please do NOT fix code errors in people's questions. That is an ANSWER. The error is the reason people asked in the first place - what's the point of editing the question instead of giving an answer? Show correct code in the answer, leave the errors in the question. IMHO. If you edit away errors people will wonder why there ever was a problem.
What is the consensus or majority opinion? If you agree, should such problems be included in the "review tests" given to reviewers? 3 out of 5 people accepted that edit.
PS: By the way, I rolled back the edit - the edit's author himself had agreed I was right too, in a response to my comment quoted above. (Link)
EDIT: Duplicate it is - but not of the question linked to, but of this question:
Edit review audits should contain "obviously" invalid code edits