(33) باب أَكْلُ النَّاسِي وَشُرْبُهُ وَجِمَاعُهُ لاَ يُفْطِرُ
Abu Huraira reported Allah's Messenger (ﷺ) as saying:
If anyone forgets that he is fasting and eats or drinks he should complete his fast, for it is only Allah Who has fed him and given him drink.
Reference: Sahih Muslim 1155
In-book reference: Book 13, Hadith 222
USC-MSA web (English) reference(deprecated numbering scheme): Book 6, Hadith 2575