All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
According to the scholars of Fiqh's (jurisprudence) definition of a vow, it is a pledge of a Muslim who is competent for religious assignment to do a certain righteous deed. For the vow to be binding, it is conditioned that one expresses it by words, if he is able to, or by writing or gesture, if he is unable to speak. According to the majority of scholars, there is no specific wording for the vow. Rather, it is valid when one says any word signifying pledge and commitment, such as "By Allaah, I will slaughter a camel," or, "If Allaah heals me, I will give one third of my wealth as charity," and so on.
In Al-Mughni, Ibn Qudaamah said: "The wording of a vow is to say, 'By Allaah, I will do such-and-such.' If one says, 'I vow to do such-and-such,' then the vow is binding because he explicitly states the word 'vow'. It is also a vow when one says, 'If Allaah heals me, I will fast a month.'"
Consequently, the wording mentioned in the question is not considered a vow, because it does not signify a pledge to do something. It should also be taken into consideration that a conditional vow is disliked in the Sharee'ah, according to the majority of the scholars of Fiqh. Moreover, some of the scholars consider all types of vows disliked in the Sharee'ah due to the relevant forbiddance by the Prophet, sallallaahu ‘alayhi wa sallam, which is reported in Saheeh Al-Bukhari and Saheeh Muslim
Ibn Qudaamah said: "Making vows is not recommended in the Sharee'ah. It was narrated on the authority of Ibn ‘Umar that the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, forbade vows and said, "It (vow) has no effect against fate but is the means whereby (something) is extracted from the miserly person." [Al-Bukhari and Muslim] However, this forbiddance implies that it is disliked and not prohibited. Had it been prohibited, Allaah would not have praised those who fulfill their vows, since their guilt in doing what is prohibited would have been greater that their obedience in fulfilling the vow. Also, had making vows been recommended, the Prophet, sallallaahu ‘alayhi wa sallam, and his noble Companions would have done so."
It is recommended for a Muslim who intends to do a righteous deed to fulfill his intention. When he expresses his intention in words, it is worthier and more deserved to be fulfilled. Allaah says (what means):
• {And more appropriate for them [would have been], obedience and good words. And when the matter [of fighting] was determined, if they had been true to Allaah, it would have been better for them.} [Quran 47: 20-21]
• {... [those who] fulfill their promise when they promise; and [those who] are patient in poverty and hardship and during battle. Those are the ones who have been true, and it is those who are the righteous.} [Quran 2: 177]
If you vowed to do something disliked or prohibited by the Sharee'ah or to abandon something recommended or obligatory, then you should not do so.
Allaah Knows best.