The Prophet ﷺ said, "Whoever eats or drinks out of forgetfulness has not broken his fast, for it is only a provision that Allah has provided for him."
حدثنا أبو سعيد الأشج حدثنا أبو أسامة عن عوف عن ابن سيرين وخلاس عن أبي هريرة عن النبي ﷺ مثله أو نحوه
Sourcing, [sahih]. Bukhari also narrated it in the Book of Oaths and Vows, chapter, If He Breaks an Oath, hadith no. 6669, from the hadith of Abu Usama with the same wording. See also the previous hadith.On this subject there is also a narration from Abu Saeed [Daraqutni, 2/177, 178] and from Umm Ishaq al-Ghanawiyya [Ahmad, 6/367].