Hadithcore
Mishkat al-Masabih, 2003

Abu Huraira reported God’s messenger as saying, “If anyone forgets when he is fasting and eats or drinks he should complete his fast, for it is only God who has fed him and given him drink.” (Bukhari and Muslim.)

وَعَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسلم: «من نسي وَهُوَ صَائِم فأل أَوْ شَرِبَ فَلْيُتِمَّ صَوْمَهُ فَإِنَّمَا أَطْعَمَهُ اللَّهُ وسقاه»

References1 variant
In-Book Reference
Book 7, Hadith 47