All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Whoever makes a vow to fast, has to fulfill his vow. The Prophet said: “If anyone vows to do an act of obedience that is for Allah, he must fulfill it.”
The fast that becomes obligatory due to the vow is just like the fast that is obligatory in the Shareeah. Therefore, everyone who cannot fast due to an incurable disease, should feed a poor person for any day he has missed fasting. Some scholars even impose the expiation of breaking the vow along with feeding a poor person. This is the opinion of the Hanbali School of jurisprudence. Mataalib Uli-Nuha reads: “The one who vows to fast and cannot fulfill it due to his old age or sickness that is not curable, has to feed a needy person for each day he has missed to fast along with offering the expiation. The reason of expiation is failing to fulfill the vow and reason of feeding is for neglecting an obligatory act.”
If the sickness is temporary and curable, the person should wait till he restores his health and then he should make up for the missed fast.
For more benefit on breaking an oath and expiating for it, please refer to Fataawa 367117, 356647, 102811, 138168, 96130, 311782, 136842 and 252961.
Allah knows best.