vows, ẓihār (the pre-Islamic formula likening one’s wife to a permanently unmarriageable female relative), and declarations of prohibition. All of these are alike: a person does not break his oath in them unless he acts knowingly, remembers, and does so voluntarily. This is because breaking one’s oath, as the term itself indicates, is sinful. Thus, if you are ignorant, forgetful, or compelled, then there is nothing upon you. This is the correct view; it was the view preferred by Shaykh al-Islam Ibn Taymiyyah (d. 728 AH), and it is what the general evidence indicates.
His statement: “Whoever says, concerning an oath for which expiation is prescribed, ‘If Allah wills,’ has not broken his oath.” The word “whoever” is a conditional noun that renders the verb jussive, and “has not broken his oath” is the apodosis of the condition. Thus, “whoever” includes every person who takes an oath: anyone who swears and says, “If Allah wills,” has not broken his oath.
His statement, “an oath for which expiation is prescribed,” means an oath to which expiation applies, such as an oath by Allah, a vow, and ẓihār. These are three matters for all of which expiation is prescribed. Divorce and manumission are thereby excluded, since no expiation applies to them.
Thus, if he says, regarding an oath for which expiation is prescribed, “If Allah wills,” he has not broken his oath—that is, no expiation is due from him, even if he acts contrary to what he swore.
An example involving an oath by Allah: if he says, “By Allah, I will not wear this garment, if Allah wills,” then wears it, nothing is due from him, because he said, “If Allah wills.” Likewise, if he says, “By Allah, I will wear this garment today, if Allah wills,” but the sun sets before he wears it, then nothing is due from him.
The evidence is the Prophet’s ﷺ statement: “Whoever swears an oath and then says, ‘If Allah wills,’ has not broken his oath.” (1) Another proof is the story of Solomon ﷺ