Imām Muḥammad ibn Ṣāliḥ al-Uthaymīn [d. 1421 AH] said [concerning the issue of fasting for a traveller]:
What is correct [in this issue] is to base the ruling on elaboration. If fasting or refraining [from fasting] is equal as far as the traveller is concerned, [we say] that fasting is better for four reasons:
Thus, we say that it is better for a traveller to fast.
However, if fasting is something that causes harm for the traveller, then breaking the fast is better.
The evidence of this is that the Messenger of Allāh [ﷺ] was fasting while travelling, [however, He did not break his fast until it was said to him that fasting has become difficult for the people and they are waiting to see whether he intended to continue [fasting], and that they currently refuse to break their fast out of their desire to emulate the Messenger [ﷺ]. So, after ʿaṣr the Prophet [ﷺ] called for a vessel of water, which he placed on his thigh so that the people could observe, and he drank while the people watched him, so that they could imitate his action. When it was then said to him that there remained people who continued their fast, he said: ‘They are the disobedient ones, they are the disobedient ones.’ This is because they continued fasting even in the face of the difficulty they were experiencing, and because of their incongruency with the Messenger [ﷺ] in their actions, by continuing to fast while he opted to break his. If the difficulty [experienced by a fasting person] is rigorous to the point where an individual fears that it will cause them harm, then fasting is ḥarām as Allāh says:
وَلَا تَقْتُلُوا أَنفُسَكُمْ ۚ إِنَّ اللَّهَ كَانَ بِكُمْ رَحِيمًا ﴿٢٩﴾
‘And do not kill yourselves [or one another]. Indeed, Allah is to you ever Merciful.’
[Al-Nisāʾ 4:29]
Source: Al-Sharḥ al-Mumtiʿ 6:330-331
Translated by: Riyāḍ al-Kanadī