This excerpt is taken from the book of Fadhilat al-Shaykh Mubashir Ahmad Rabbani, may Allah have mercy on him, Ahkam and Masail of Ramadan.
Ruling on Nutritional and Non-Nutritional Injections While Fasting:
Question:
Does getting an injection during the day in Ramadan affect the fast?
Fatwa:
There are two types of injections:
➊ The one that is used for nutritional purposes and makes one independent of eating and drinking because it is considered to be in the meaning of food and drink; this breaks the fast because the texts of Shariah encompass meanings, and whatever form that meaning takes, the ruling is applied according to those texts.
➋ The injection that is not used for nutritional purposes and does not make one independent of eating and drinking does not break the fast because the literal or figurative application of the text does not apply to it, meaning it is neither food nor in the meaning of food and drink. The principle is that the fast remains valid as long as no action occurs that would break the fast according to the requirements of Shariah evidence.