Question: If one eats forgetfully while fasting, is the fast broken?
Answer: If one eats forgetfully while fasting, the fast is not broken. If he remembers that he is fasting while the food is still in his mouth, and spits it all out (without swallowing anything), he is still fasting.
(Al-Fatāwā al-Hindiyyah, Kitāb aṣ-Ṣawm, vol. 1, p. 203).