This is what the scholars called a conditional vow (nadhr mu’allaq), as the vow is subject to the condition that a certain thing happen. The ruling on this is that if the thing vowed is an act of worship and the thing stated as the condition comes to pass, it become obligatory to fulfil the vow, because the Prophet (peace and blessings of Allaah be upon him) said: “Whoever vows to obey Allaah then let him obey Him, and whoever vows to disobey Allaah let him not disobey Him.” Narrated by al-Bukhaari, 6318.
Ibn Qudaamah (may Allaah have mercy on him) said concerning vows to do acts of worship: “These are of three types, one of which is doing the acts of worship in return for a blessing bestowed or a harm warded off, such as if a person says, ‘If Allaah heals me, then I will fast one month for Allaah.’ So this act of worship becomes binding because it is obligatory in principle in sharee’ah, like fasting, prayer, charity and Hajj, and it is obligatory to fulfil this vow according to scholarly consensus.”
The condition in the case of this vow is the cessation of arguments between this woman and her husband, without divorce.
One of the following two scenarios must apply in this woman’s case.
Either she wanted a specific argument that was taking place at the time of the vow to cease without divorce, in which case she is obliged to fulfil the vow because the condition was met, which is that the argument ceased without divorce, and the divorce that took place after that does not matter because that had to do with a different argument,
Or she wanted the arguments that were taking place between her and her husband for a particular reason to cease altogether, so that they would not happen again. In this case she is not obliged to observe these fasts, because the condition was not fulfilled, as the arguments happened again and divorce occurred as a result. Perhaps what she says in her question, “but Allaah decreed that the same argument should arise again”, is indicative of that.
This woman should define what she meant, and then do whatever she is obliged to do according to sharee’ah.
It should be noted that vows are makrooh in principle, because of the report narrated by al-Bukhaari (6608) and Muslim (1639) from Ibn ‘Umar (may Allaah be pleased with him), that the Prophet (peace and blessings of Allaah be upon him) forbade vows and said: “They do not change anything, they only make a stingy person give (in charity).”
Al-Maaziri said: It may be understood that the reason for them not being allowed is that a vow becomes binding, and he may do it under compulsion, without enthusiasm. Or it may be understood that the reason is that he may offer the sacrifice that he promised in his vow in return for the things that he asked for, and thus his reward will be reduced. The point of worship is that it should be purely for the sake of Allaah. Al-Qaadi ‘Iyaad said: It may be understood that the prohibition is because some ignorant people may think that the vow changes the divine decree and prevents the divine decree from being carried out, so it was forbidden lest some ignorant people believe that. The context of the hadeeth supports that. And Allaah knows best.
From Sharh Muslim by al-Nawawi.
The believer should avoid doing that which the Prophet (peace and blessings of Allaah be upon him) disallowed. Whoever wants to obey or worship Allaah, let him do so without making vows.
And Allaah knows best.