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. (Using translation from Muslim 1155)
عَنِ النَّبِيِّ ﷺ قَالَ «مَنْ نَسِيَ وَهُوَ صَائِمٌ فَأَكَلَ أَوْ شَرِبَ فَلْيُتِمَّ صَوْمَهُ فَإِنَّمَا أَطْعَمَهُ اللَّهُ وَسَقَاهُ»