The Prophet ﷺ said, "Allah has pardoned my community for what their souls whisper to them, as long as they do not act upon it or speak it."Qatada said, "If a man pronounces divorce within himself, it carries no weight."
عن النبي ﷺ قال: إن الله تجاوز عن أمتي ما حدثت به أنفسها ما لم تعمل أو تتكلم. قال قتادة: إذا طلق في نفسه فليس بشيء.
Bukhari narrated it in the Book of Divorce (5269), and Muslim in the Book of Faith (127), both of them through Hisham, who said, Qatada narrated to us, from Zurara bin Awfa, from Abu Hurairah, and he related it. Their wording is the same, except that Muslim did not mention Qatada's statement.