Eating out of forgetfulness in Ramadan does not matter
Question

What is the ruling on one who eats or drinks out of forgetfulness during Ramadan?
Praise be to Allah.That does not matter and his fast is valid, because Allah says at the end of Soorat al-Baqarah (interpretation of the meaning): 
“Our Lord! Punish us not if we forget or fall into error” [al-Baqarah 2:286]
It was narrated in a saheeh report from the Messenger of Allah (peace and blessings of Allah be upon him) that Allah said, “I have done that.” And it was narrated from Abu Hurayrah (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: “Whoever forgets that he is fasting and eats or drinks, let him complete his fast, for the One Who fed him and gave him to drink was Allah.” (Agreed upon). 
The same applies if he has intercourse because of forgetfulness; his fast is still valid according to the more correct of the two scholarly opinions, because of this aayah and this hadeeth, and because the Prophet (peace and blessings of Allah be upon him) said: “Whoever breaks his fast in Ramadaan out of forgetfulness, he does not have to make that day up and he does not have to offer any expiation (kafaarah).” (Narrated and classed as saheeh by al-Haakim). This wording includes intercourse and other things that break the fast, if the fasting person does them because of forgetfulness. This is from the mercy, bounty and kindness of Allah, for which we praise and thank Him.