The Messenger of Allah ﷺ said, "Whoever eats from this tree should not disturb us with it in this mosque of ours."Yaqub said, meaning garlic.
حدثنا أبو كامل حدثنا إبراهيم حدثنا ابن شهاب ويعقوب حدثنا أبي عن ابن شهاب عن سعيد بن المسيب أن
أن رسول الله ﷺ قال من أكل من هذه الشجرة فلا يؤذينا بها في مسجدنا هذا قال يعقوب يعني الثوم
Its isnad is sahih. Ibn Majah related it (1015) from Abu Marwan Uthmani, from Ibrahim bin Saad, with this same chain, but he mentioned garlic in the course of the hadith, making the wording marfu.Muslim related it (1:156) via the route of Maamar, from Zuhri, with similar wording, saying, "Let him not come near our mosque, nor harm us with the smell of garlic." Munziri mentioned it in Targhib wal-Tarhib (1:134), and also attributed it to Nasai.Regarding his saying, "nor harm us," it is thus established with the letter ya in all three original manuscripts, and in manuscript M a mark of correctness was written above it.