If someone grabs the code to try to reproduce the error and gets unrelated sytanx errors, that's their time wasted. The comment about the error helps others from wasting their time too... until the problem is fixed.
As there is a taboo of modifying someone else's code, this is best done with a comment and hope the OP will fix it.