‘Imran b. Husain reported God's Messenger as saying, “A vow to do an act of disobedience must not be fulfilled, or one to do something over which one has no control.”
Muslim transmitted it. A version has, “No vow must be taken to disobey God.”
Abu Huraira and Ibn ‘Umar reported God’s Messenger as saying, “Do not make vows, for a vow has no effect against fate; it is only from the miserly that it is a means by which something is extracted.”