Praise be to Allaah.
So long as you did not know that swallowing this food breaks the fast, then you do not have to make up those days, because ignorance of things that break the fast is a valid excuse, according to the correct view.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said: Things that break the fast and that may be done voluntarily, do not break a person’s fast unless three conditions are met:
The first condition is that he is aware, and the opposite of awareness is ignorance.
So if a person eats something and he is ignorant, then he does not have to make up that day. Ignorance is of two types:
(i)Ignorance of the ruling, such as if a person vomits deliberately but he is not aware that vomiting breaks the fast. In this case he does not have to make up the fast because he is ignorant. The evidence that the one who is ignorant of the ruling does not break his fast is the report that is proven in al-Saheehayn from the hadeeth of ‘Adiyy ibn Haatim (may Allaah be pleased with him), who said that he put two ropes – one black and one white – beneath his pillow. These were ropes of the type used to hobble camels. He started looking at them, and when he could distinguish between the white rope and the black one, he stopped eating and drinking. The next day he went to the Prophet (peace and blessings of Allaah be upon him) and told him about that. The Prophet (peace and blessings of Allaah be upon him) said to him: “Your pillow must be very wide, if the white thread and the black thread are beneath your pillow. Rather that is the blackness of the night and the whiteness of the day” But the Prophet (peace and blessings of Allaah be upon him) did not tell him to make that day up, because he had been unaware of the meaning of the verse.
(ii)Ignorance of the time. For example, if a person thinks that dawn has not yet broken, then he finds out that it had broken. He does not have to make up that day. Similarly if a person breaks the fast at the end of the day thinking that the sun has set, then he finds out that it had not set, he does not have to make up that day either. The evidence for that is the report narrated by al-Bukhaari from Asma’ bint Abi Bakr (may Allaah be pleased with her) who said: We broke our fast on a cloudy day at the time of the Prophet (peace and blessings of Allaah be upon him), then the sun came out. The point here is that if the fast was invalidated, it would have been obligatory to make it up, and if it had been obligatory to make it up, the Prophet (peace and blessings of Allaah be upon him) would have commanded them to do that. If he had ordered them to make it up, this would have reached us because it is part of preserving sharee’ah. As there is no report that says that the Messenger (peace and blessings of Allaah be upon him) told them to do that, and as he did not tell them to do that, it is known that the fast was not invalidated, so it does not have to be made up in this case. But as soon as a person realizes what the situation is, he must stop eating and drinking, so that even if there is a morsel in his mouth, he has to spit it out. End quote from Majmoo’ Fataawa al-Shaykh Ibn ‘Uthaymeen (19/116).
Then he mentioned the second and third conditions, which are that he should be aware of the situation and observing the fast willingly.
Thus it is known that you do not have to make up these fasts.
And Allaah knows best.