Sahih Muslim
Sahih Muslim 561a
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَزُهَيْرُ بْنُ حَرْبٍ، قَالاَ حَدَّثَنَا يَحْيَى، - وَهُوَ الْقَطَّانُ - عَنْ عُبَيْدِ اللَّهِ، قَالَ أَخْبَرَنِي نَافِعٌ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ فِي غَزْوَةِ خَيْبَرَ " مَنْ أَكَلَ مِنْ هَذِهِ الشَّجَرَةِ - يَعْنِي الثُّومَ - فَلاَ يَأْتِيَنَّ الْمَسَاجِدَ " . قَالَ زُهَيْرٌ فِي غَزْوَةٍ . وَلَمْ يَذْكُرْ خَيْبَرَ .
Muhammad ibn al-Muthanna and Zuhayr ibn Harb reported to us: Yahya—the Qattan—reported to us, from Ubaydullah, who said: Nafi informed me, from Ibn Umar, that the Messenger of Allah (peace and blessings be upon him) said during the expedition of Khaybar: 'Whoever eats from this plant—meaning garlic—must not come to the mosques.' Zuhayr's version says 'during an expedition' and does not mention Khaybar.