Nafi' narrates from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "When a man swears an oath and says 'In sha' Allah' (If Allah wills), then he has made an exception."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 15118
Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) says that the Prophet (peace and blessings be upon him) said: "Whoever swears an oath and says 'In sha' Allah', he has the choice: if he wishes he may do it, or not do it."
A weak hadith has been narrated on this from Sayyiduna Mu'adh bin Jabal (may Allah be pleased with him) as marfu' (attributed to the Prophet).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 15119
Sayyiduna Mu'adh bin Jabal (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said to me: "O Mu'adh! Of all that Allah Almighty has created on the face of the earth, the most hateful thing to Allah is divorce, and of all that Allah has created on the face of the earth, the most beloved thing to Allah Almighty is freeing (slaves). When a man says to his slave: 'You are free, In sha' Allah (if Allah wills)', he becomes free, and the exception is of no benefit; and when a man says to his wife: 'Anti taliq in sha' Allah' (You are divorced if Allah wills), the divorce does not take effect because of the exception being present."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 15120
Sayyiduna Mu'adh bin Jabal (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) was asked about a man who says to his wife: 'Anti taliq in sha' Allah' (You are divorced if Allah wills). He (peace and blessings be upon him) said: "His exception stands." The narrator says: That man asked: If someone says to his slave: 'Anta hurr in sha' Allah' (You are free if Allah wills)? He (peace and blessings be upon him) said: "He becomes free, because Allah likes freeing (slaves), while He does not will divorce."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 15121
(Through another chain) from Humayd bin Malik al-Nakha'i, he mentioned something similar to the hadith of Isma'il. Humayd said: Yazid bin Harun said to me: What a hadith it would be if Humayd bin Malik al-Lakhmi were known! I said: He is my father's grandfather. Yazid said: Now you have pleased me; it has become a hadith.
Al-Shaykh (al-Bayhaqi) said: There is not much cause for pleasure in it, for Humayd bin Rabi' bin Humayd bin Malik al-Kufi al-Khazzaz is very weak; Yahya bin Ma'in and others attributed lying to him. Humayd bin Malik is majhul (unknown), and (the narration of) Makhul from Mu'adh bin Jabal is munqati' (broken). It has also been said: from Humayd, from Makhul, from Khalid bin Ma'dan, from Mu'adh bin Jabal (may Allah be pleased with him); and it has been said: from him, from Makhul, from Malik bin Yukhamir, from Mu'adh; and that is not mahfuz (preserved). And Allah knows best. And in opposition to it a weak hadith has been narrated, the like of which may not be used as evidence.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 15122
Ata' narrates from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever says to his wife: 'You are divorced, In sha' Allah (if Allah wills)', or says to his slave: 'You are free, In sha' Allah (if Allah wills)', or (says) that he will walk to the House of Allah, In sha' Allah (if Allah wills), then nothing is binding upon him."
Abu Ahmad (Ibn Adi) said: This hadith, with its chain, is munkar (denounced); no one narrates it except Ishaq al-Ka'bi. Al-Shaykh (al-Bayhaqi) said: It has also been narrated from al-Jarud bin Yazid, from Bahz bin Hakim, from his father, from his grandfather, as marfu' (attributed to the Prophet), concerning divorce alone, and it too is da'if (weak). The hadith of Ibn Umar (may Allah be pleased with him) suffices, and success is from Allah.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 15123