Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I just saw a (very...) common question on SO, so I copied an answer from the PHP documentation with link.

Trouble is, I misremembered what the example did (remove excess whitespace vs. removing all whitespace as the poster had requested), and didn't notice this until a couple of commenters went, "Hey! WTF!" There's a moral in here somewhere about the dangers of copy+paste.

Is it appropriate in this situation to edit the answer with a remark to this effect? I don't want the incorrect version floating around there to mislead people who don't look at it too closely, but it also seems kind of... I dunno... unfair to the commenters (because I can just picture future commenters saying, "You guys are wrong! It clearly removes all whitespace!").

share|improve this question
Just a side note: 'Common' questions (means it was asked repeatedly) should be marked as duplicates instead of being answered. – Time Traveling Bobby Jul 15 '10 at 7:08
up vote 10 down vote accepted

What I tend to do in this situation is either:

  • Delete the answer (if its really really wrong, and someone else has posted the correct answer already)
  • Edit the answer to be correct, and post a comment along the lines of "I've fixed it now..."
share|improve this answer

Actually, it's kind of fun getting all those commenters frowned upon. :)

No, but seriously, there will be a "edited on " at the bottom of the answer, so it'll be easy to tell that it must have been edited before. Only the new users would probably think otherwise.

Whenever a comment is there which points to a mistake which doesn't exist anymore, I assume that it had been there before, and it was then corrected.

If you're not as evil as I am, though, you could do what @Kragen suggested earlier.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .