That the Messenger of Allah (ﷺ) said: "Whoever swears [about an oath] and says: 'If Allah…

Jami` at-Tirmidhi Book 20 Hadith 10

Jami` at-Tirmidhi #1532

The Book on Vows and Oaths 20:10

Narrated Abu Hurairah:

That the Messenger of Allah (ﷺ) said: "Whoever swears [about an oath] and says: 'If Allah wills (Insha Allah), then he will not have broken it."

Chapter: What Has Been Related About Making Exceptions In Oath

Grade: Sahih (Darussalam)