All perfect prasie be to Allah, The Lord of The Worlds, and may His Peace and Blessings be upon our Prophet Muhammad and upon all of his family and companions.
Shafi`i scholars are of the view that swallowing mucus voluntarily after it reaches the throat invalidates fasting. However, Hanafi and Maliki scholars ease the ruling by stating that it doesn`t, even if it reached the tongue.
It is stated: "If he swallowed mucus after he had cleared it from his throat to his mouth, his fasting is considered valid." {Rad Al-Mohtar,vol.2/pp.400}.
An`Nafrawi, a Maliki scholar, stated: "Mucus is cleared out of the chest and reaches the tip of the tongue, then it is swallowed, even if it could be spitted it out, and a person`s fasting remains valid and he/she isn`t obliged to make up for that day. However, this contradicts with the view of Khalil who ruled that a person who could spit mucus out, but swallowed it is obliged to make up for the fast of that day." {Al-Fawakeh Al-Dawani, vol.1/pp.209}.
In conclusion, a person could spit mucus out or it could be difficult for him to do so:
1- If he could spit it out then he isn`t allowed to swallow it, and if he did swallow it then his fasting is invalidated according to our Madhab (Shafi`i school of thought).
2- If he couldn`t spit it out then swallowing it doesn`t render his fasting invalid. And Allah Knows Best.