Sahih al-Bukhari, Book 30, Hadith 40 (Bukhari 1862)

Narrated Abu Huraira:

The Prophet (ﷺ) said, "If somebody eats or drinks forgetfully then he should complete his fast, for what he has eaten or drunk, has been given to him by Allah."