Sayyiduna Sa'd (may Allah be pleased with him) narrates that he said: "I heard the Messenger of Allah (peace and blessings be upon him) say: 'When one of you spits or expels phlegm in the mosque, he should conceal (bury) it, lest it touch the skin or the clothes of a believer and harm him.'"
Abu Bakr bin Khuzaymah (may Allah have mercy on him) narrated it through al-Fadl bin Ya'qub al-Jazari (may Allah have mercy on him), from Abd al-A'la (may Allah have mercy on him), from Ibn Ishaq (may Allah have mercy on him).