Accidentally eating or drinking while fasting
It sometimes happens that a person eats or drinks out of forgetfulness while fasting. In this case, the Muslim may panic, because has the fast just been broken?
The Muslim who eats or drinks out of forgetfulness should resume fasting. The day does not have to be made up, nor is there expiation for this deed. The fast is still valid.
Narrated by Abu Huraira: The Messenger of Allah (ﷺ) said: "Whoever forgetfully eats or drinks while fasting, let him complete his fast, for Allah has fed him and given him drink." [Sahih al-Bukhari 1933, Sahih Muslim 1155]
What scholars say about it
The schools of thought have spoken on this issue. They came to the conclusion that a Muslim should resume his fast after he ate or drank out of forgetfulness.
The Maliki madhab however, believes that the person should make up the day if he ate or drank out of forgetfulness. This is not the correct opinion, because of the narration of Abu Huraira which indicates that the fast remains valid.
قال عبد اللَّه: قال: سألت أبي عمن أفطر يومًا من رمضان ناسيًا؟
قال: ليس عليه قضاء ولا كفارة ولا شيء، أذهب إلى حديث أبي هريرة (١).
"مسائل عبد اللَّه" (٧١٩)
Imam Ahmad said: "As for the one who eats or drinks out of forgetfulness, he does not need to make up for that day nor pay expiation, because of the narration of Abu Huraira." [Masail Abdullah 719]
(قَالَ الشَّافِعِيُّ): وَمَنْ أَكَلَ أَوْ شَرِبَ نَاسِيًا: فَلْيُتِمَّ صَوْمَهُ وَلَا قَضَاءَ عَلَيْهِ وَكَذَلِكَ بَلَغَنَا عَنْ أَبِي هُرَيْرَةَ وَقَدْ قِيلَ: إنَّ أَبَا هُرَيْرَةَ قَدْ رَفَعَهُ مِنْ حَدِيثِ رَجُلٍ لَيْسَ بِحَافِظٍ.
ص106 - كتاب الأم للشافعي
Imam Shafi'i said: "Whoever eats or drinks out of forgetfulness should resume the fast. One does not have to make up that day, because of the narration of Abu Huraira." [Al-Umm 106 from Imam Shafi'i]
فِيمَنْ أَكَلَ فِي رَمَضَانَ نَاسِيًا قُلْتُ: أَرَأَيْتَ مَنْ أَكَلَ أَوْ شَرِبَ أَوْ جَامَعَ امْرَأَتَهُ فِي رَمَضَانَ نَاسِيًا، أَعَلَيْهِ الْقَضَاءُ فِي قَوْلِ مَالِكٍ؟
قَالَ: نَعَمْ وَلَا كَفَّارَةَ عَلَيْهِ.
ص277 - كتاب المدونة
It was narrated that Imam Malik held the opinion: "Whoever accidentally eats or drinks during Ramadan should make up for that day, but he does not have to pay expiation (kaffaarah)." [Al-Mudawannah 277 from Ibn Sahnun]