Abu Huraira (may Allah be pleased with him) reported
that Allah's Messenger (May the blessings of Allah be with him) said:
“Whoever forgets that he is fasting
and eats or drinks something,
let him complete his fast,
for it is Allah Who has fed him and given him to drink.”
(Reported by Al-Bukhari and Muslim)