after waking up for suhoor i was busy figuring out if something is haram so when i went to pray fajr there was 5 mins left and i went to go make wudu and while i was making wudu when i washed my mouth instead of spitting like i normally do i forgot to spit and i swallowed the water i noticed my mistake immediately and was worried about if my fast broke, this wasn’t on purpose because i was not thirsty and i didn’t put too much water
If you completely and genuinely forget that you were fasting and eat something, your fast is still considered valid as long as you stop as soon as you realize.
However, if you accidentally consume something in circumstances that could have been avoidable, for example while performing ablution before prayer, then your fast becomes void.
One of the eight steps of ablution includes the rinsing of the mouth, and accidentally swallowing the water during this step would break your fast.
Mr Hassan explains: "When you're performing ablution while fasting, you're actually recommended to avoid gargling. You're just supposed to rinse your mouth and spit it out straight away."