Abu Hurayrah (may Allah be pleased with him) reported that the Prophet (may Allah's peace and blessings be upon him) said: "Allah has forgiven my Ummah for the thoughts that come to their minds, unless they act upon them or utter them." Qatādah said: "If one divorces (his wife) in his head (without pronouncing it), it is nothing."
شرح الحديث :
This Hadīth shows that one is not held accountable for the thoughts and whims that come to one's mind as long as one does not express them verbally nor acts upon them. This Hadīth also proves that divorce does not occur if it comes as a thought in one's mind, as it has not been said in words. Rulings of divorce and similar things take effect based on words, and not on inner thoughts that have not been uttered.