Is it obligatory to fast Ramadan for one who has Covid-19?
Question

Is it permissible to fast when one has Covid-19?
Praise be to Allah.Firstly:
There is nothing special about Covid-19 with regard to fasting, and there is no specific reason connected to Covid-19 that has anything to do with the ruling on fasting or not.
Rather the one who has Covid-19 is like any other sick person, meaning that if it is clearly too difficult for him to fast, then it is permissible for him not to fast, because Allah, may He be exalted, says (interpretation of the meaning):
{So whoever among you is ill or on a journey [during them] - then an equal number of days [are to be made up]} [al-Baqarah 2:184].
Ibn Hazm (may Allah have mercy on him) said: The scholars are unanimously agreed that if sickness weakens a person and makes him unable to fast, then he may break the fast."(Maratib al-Ijma‘, p. 40).
Secondly:
There are several scenarios for one who is sick:
1. If his sickness is mild, meaning that it will not harm him and it does not make it difficult to fast, such as a mild cold or mild headache, then in this case he must fast according to the majority of scholars, and it is haram for him not to fast.
2. If his sickness makes it too difficult for him to fast, but it will not harm him, then in this case it is permissible for him not to fast, according to scholarly consensus, as noted above.
3. If there is the fear that he may die of this sickness, then it is obligatory for him not to fast, according to the majority of scholars.
4. If his sickness will harm him, meaning that fasting will exacerbate his sickness or delay his recovery, then there is a difference of scholarly opinion: is it permissible or obligatory for him to break the fast? The correct view is that it is obligatory.
Some of the jurists restrict the obligation to break the fast to cases where severe harm will occur.
Ibn Nujaym said in al-Bahr ar-Ra’iq (2/303): The one who fears that his sickness will be exacerbated may break the fast, because Allah, may He be exalted, says (interpretation of the meaning):
{So whoever among you is ill or on a journey [during them] - then an equal number of days [are to be made up]} [al-Baqarah 2:184].
So it is permissible for anyone who is sick to break the fast.
But the reason why breaking the fast is permitted in the case of sickness is only for the purpose of warding off harm, and what is meant by harm is exacerbation of the sickness, or delay in recovery, or damage caused to some limb or faculty.
Ascertaining that [what will happen if one fasts] may be based on the sick person’s own ijtihad, and his conclusion is not to be based on mere speculation; rather it is based on what is most likely to happen, which in turn is based on some symptoms of his sickness or his experience, or if a Muslim doctor who does not appear to be of bad character tells him that. And it was said that being certain that the doctor who tells him that is of good character is stipulated [in order to accept his advice] …
The sick person has the choice between fasting and not fasting, but not fasting is a concession, whereas fasting is a sign of religious commitment, so it is preferable. But if the sick person fears that he may die, then breaking the fast becomes obligatory. This is what it says in al-Bada’i‘. End quote.
‘Ulaysh said in Minah al-Jalil (2/150): And it is permissible to break the fast because of sickness when the sick person fears, or he is certain or thinks it most likely, based on his own experience, or if he is told by a physician of good character that the sickness will be exacerbated by fasting, or recovery will be delayed, or the sick person will suffer hardship and fatigue as a result of fasting, or even if the sickness will not be exacerbated and recovery will not be delayed [but the individual finds it too difficult to fast].
But if the individual fears that he will become sick as a result of fasting, it is not permissible for him to break the fast. This is the correct view, because perhaps that will not happen to him at all.
And it was said that it is permissible.
It is obligatory to break the fast, whether the individual is sick or healthy, if he fears, or he is certain or thinks it most likely that he may die or suffer severe harm that will lead to losing a faculty such as his vision, if he fasts, because preserving life and faculties is obligatory. End quote.
It says in Mughni al-Muhtaj (2/169): It is permissible for the sick person not to fast, with the intention of availing himself of the concession, according to the religious texts and scholarly consensus, if that will lead to severe harm and the harm is of the type that makes tayammum permissible. This is what is mentioned in ash-Sharhayn wa’r-Rawdah. As for what the author said – that the sick person for whom fasting is too difficult or he will be greatly harmed by it – this means that either of the two is sufficient [to allow him not to fast]. That, as al-Isnawi said, is the correct view. Allah, may He be exalted, says (interpretation of the meaning):
{and do not throw [yourselves] with your [own] hands into destruction} [al-Baqarah 2:195].
… And he must break the fast if he fears death, as was stated by al-Ghazali and others, and was affirmed by al-Adhra‘i. End quote.
Ibn Qudamah (may Allah have mercy on him) said in al-Kafi (1/434): The sick person may break his fast, but he must make it up, because Allah, may He be exalted, says (interpretation of the meaning):
{So whoever among you is ill or on a journey [during them] - then an equal number of days [are to be made up]} [al-Baqarah 2:184].
What makes it permissible not to fast is the fear that fasting may exacerbate his sickness or delay recovery.
As for that which is not affected by fasting, such as toothache or a pain in the finger, and the like, that does not make it permissible to break the fast, because no harm will result from fasting. If someone starts the day fasting then falls sick during the day, he may break the fast, because harm is already there. End quote.
The correct view is that if fasting will cause him harm, then he must break the fast.
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said: It is permissible for a sick person [to break the fast] if fasting will harm him. So if a person is sick and could be harmed by fasting, then breaking the fast is prescribed in his case. This is according to what the author (may Allah have mercy on him) said.
If he does not break the fast, then he is turning away from the concession granted by Allah, may He be glorified and exalted, and turning away from the concession granted by Allah is wrong. What the individual should do is accept the concession granted by Allah.
The correct view is that if fasting will harm him, then fasting becomes haram and breaking the fast becomes obligatory, because Allah, may He be exalted, says (interpretation of the meaning):
{ And do not kill yourselves} [an-Nisa’ 4:29].
This prohibition includes fasting, if it could lead to death, or if it could lead to harm.
The evidence that it includes that which could lead to harm is the hadith of ‘Amr ibn al-‘As (may Allah be pleased with him): when he led his companions in prayer whilst in a state of janabah, but he was afraid of the cold, so he did tayammum. The Prophet (blessings and peace of Allah be upon him) said to him: “Did you lead your companions in prayer when you were junub?” He said: O Messenger of Allah, I remembered the words of Allah, may He be exalted: (interpretation of the meaning): {And do not kill yourselves} [an-Nisa’ 4:29], and I was afraid of the cold. And the Prophet (blessings and peace of Allah be upon him) approved of what he had done.
In the case of one who is sick, there may be different scenarios:
1. He will not be affected by fasting, as in the case of a mild cold, or a mild headache, or a toothache, and the like. In this case it is not permissible for him to break the fast, even though some of the scholars said that that is permissible for him, because of the general meaning of the verse {and whoever is ill…} [al-Baqarah 2:185]. But we said: This ruling is based on the reason for it, so when breaking the fast is kinder to him, in that case we say that he may break the fast. But if fasting will not affect him, it is not permissible for him to break the fast and it is obligatory for him to fast.
2. If it is very difficult for him to fast, but it will not harm him, then in this case it is disliked (makruh) for him to fast and it is prescribed for him to break the fast.
3. If it is too difficult for him to fast and doing so will harm him, as in the case of a man who has kidney disease or diabetes and the like, then in this case it is haram for him to fast.
But if he does fast in this case, is his fast valid?
Abu Muhammad ibn Hazm (may Allah have mercy on him) said: It is not valid for him to fast, because Allah, may He be exalted, ruled that one who is sick may fast on other days. So if he fasts when he is sick, he is like one who is able to fast, but fasted in Sha‘ban instead of Ramadan, so his fast is not valid and he must make it up.
This view of Abu Muhammad is based on the famous principal that whatever is forbidden in and of itself, if it happens it is not valid. So if we say that it is haram, then according to the juristic principle, if he fasts it is not valid, because he observed a fast that was prohibited, like fasting on the days of at-tashriq and on the days of the two Eids; it is not permissible and it is not valid.
Thus to those sick people who decide that it is better to fast when fasting is difficult for them and may harm them, but they insist on fasting, we say that they did wrong when they did not accept the kindness of Allah, may He be glorified and exalted, and they did not accept His concession, and they harmed themselves. Allah, may He be glorified and exalted, says (interpretation of the meaning):
{And do not kill yourselves} [an-Nisa’ 4:29].
End quote from ash-Sharh al-Mumti‘ (6/340).
And he (may Allah have mercy on him) said: If someone were to ask: how do we determine whether fasting will cause harm and to what degree?
We say: harm is determined by how a person feels, and it may be known if a doctor tells him. As for his feelings, that means that he feels himself that fasting will harm him, cause more pain or delay recovery, and the like.
As for being told by a doctor, that means that a knowledgeable and trustworthy doctor tells him that it will harm him. If an ordinary person who is not a doctor tells him that, however, he should not take his word for it, and if someone who is not a knowledgeable doctor – rather he is someone who is involved in the medical field – tells him that, he should not take his word for it either. And if an untrustworthy doctor told him that, he should not take his word for it.
Is it stipulated that the doctor should be a Muslim in order to be trustworthy, because non-Muslims are not to be trusted?
There are two scholarly views concerning that. The correct view is that it is not stipulated, and that if we trust what he says, we may follow his advice not to fast, because that is his profession, and a non-Muslim may be sincere to his profession and keen to uphold his reputation as a doctor, so that he only says what he believes to be true. The Prophet (blessings and peace of Allah be upon him) trusted a disbeliever in the most risky situation, which was when he migrated from Makkah to Madinah. He hired a polytheist man from the tribe of Banu’d-Dayyal who was called ‘Abdullah ibn ‘Urayqit, as his guide during the journey. This was a very risky matter, because Quraysh were searching for the Messenger (blessings and peace of Allah be upon him) and were offering a reward of one hundred she-camels to the one who brought news of him. But the Messenger (blessings and peace of Allah be upon him) trusted him, which indicates that if we trust a polytheist, then we may accept his word."(Ash-Sharh al-Mumti‘  6/328).
Conclusion:
The one who has Covid-19 is sick, like any other sick person. If fasting will harm him by exacerbating his sickness or delaying recovery, according to the testimony of a trustworthy doctor, or because he feels that himself, then he must break the fast.
If fasting will not harm him, but it will cause him considerable hardship, then it is permissible for him to break the fast.
But breaking the fast has nothing to do with protecting oneself against sickness. There is no proof of that at all, and no one who has knowledge of medicine or is qualified to speak about such matters said that. So you should beware of the rumours that some people are spreading which have no scientific basis.
And Allah knows best.