Since the sentence seems to be an attempt to overcome somebody's objection to someone defending themselves, the "but" should be the first word in the sentence.
Not sure exactly what is wrong with the sentences exactly, but for clarity's sake the sentence would be broken up into at least two sentences.
Quote:It doesn't matter whether he said those words or not, but when it becomes an issue, he has to defend himself.
Better:
Quote:But it doesn't matter whether he said those words or not. When it becomes an issue, he has to defend himself.
These two sentences are correct if it already is an issue.
Quote:But doesn't matter whether he said those words or not. When it becomes an issue, he'll have to defend himself.
These two sentences should be used if it hasn't become an issue yet.