while you were in a state of major ritual impurity?” He replied, “O Messenger of Allah, I remembered Allah’s saying, ‘And do not kill yourselves.’ [al-Nisa’ 4:29] I feared the cold.” So the Prophet, peace and blessings be upon him, approved of what he had done.” (1)
A sick person may be in one of three states:
The first is that fasting does not affect him, as in the case of a mild cold, a slight headache, toothache, and the like. Such a person is not permitted to break his fast, although some scholars say that he may do so based on the general meaning of the verse: “And whoever is ill...” [al-Baqarah 2:185] However, we say that this ruling is contingent upon an effective cause: namely, that breaking the fast is easier for him. In that case, we tell him to break his fast. But if fasting does not affect him, then he is not allowed to break his fast; rather, fasting is obligatory for him.
The second state is when fasting causes him difficulty but does not harm him. In this case, it is disliked for him to fast, and recommended for him to break his fast.
The third state is when fasting causes him difficulty and harms him, such as a person suffering from kidney disease, diabetes, or the like. Fasting is prohibited for him.
But if he fasts in this state, is his fast valid?
Abu Muhammad Ibn Hazm, may Allah have mercy on him, said: His fast is not valid, because Allah, exalted is He, has prescribed for the sick person an equal number of other days. Thus, if he fasts while ill, he is like someone who is able to fast but fasts in Sha'ban in place of Ramadan: it does not suffice him, and he must make it up.