what he had heard from the Messenger of Allah ﷺ regarding the one who passes in front of a person praying.Abu Juhaym said, "The Messenger of Allah ﷺ said, 'If the one who passes in front of a person praying knew what was upon him, standing still for forty would be better for him than passing in front of him.'"Abu Nadr said, "I do not know whether he said forty days, months, or years."
حدثنا إسحق بن موسى الأنصاري حدثنا معن حدثنا مالك بن أنس عن أبي النضر عن بسر بن سعيد أن زيد بن خالد الجهني أرسله إلى
ماذا سمع من رسول الله ﷺ في المار بين يدي المصلي فقال أبو جهيم قال رسول الله ﷺ لو يعلم المار بين يدي المصلي ماذا عليه لكان أن يقف أربعين خير له من أن يمر بين يديه قال أبو النضر لا أدري قال أربعين يوما أو شهرا أو سنة
Agreed upon [by Bukhari and Muslim]. Bukhari narrated it in the Book of Prayer, chapter on the sin of the one who passes in front of a person praying, hadith no. 510, and Muslim, hadith no. 507, from the hadith of Malik through this route, and it is in Muwatta, 1/154 (Yahya).There is also a narration on this subject from Abu Saeed Khudri [Bukhari, hadith no. 509, and Muslim, hadith no. 505, and Muwatta, 1/154], Abu Hurairah [Ibn Majah, hadith no. 946], Ibn Umar [Bukhari, hadith no. 494, and before it, hadith no. 509, as a mawquf report, and Muslim, hadith no. 506], and Abdullah bin Amr [Tabarani, Majma al-Zawaid, 2/61, where he said, "Among its narrators are some I could not identify."]The hadith, "It would be better for him to stand... etc.," was narrated by Ibn Majah, hadith no. 946.