Muwatta Malik, Book 9, Hadith 37 (USC-MSA) ⓘ
Yahya related to me from Malik from Abu'n Nadr, the mawla of Umar ibn Ubaydullah from Busr ibn Said that Zayd ibn Khalid al-Juhani sent him to Abu Juhaym to ask him what he had heard from the Messenger of Allah, may Allah bless him and grant him peace, about passing in front of someone praying. Abu Juhaym said, "The Messenger of Allah, may Allah bless him and grant him peace, said, 'If the one who passes in front of a man praying knew what he was bringing upon himself it would be better for him to stop for forty than to pass in front of him.' " Abu'n-Nadr said, "I do not know whether he said forty days or months or years."
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ أَبِي النَّضْرِ، مَوْلَى عُمَرَ بْنِ عُبَيْدِ اللَّهِ عَنْ بُسْرِ بْنِ سَعِيدٍ، أَنَّ زَيْدَ بْنَ خَالِدٍ الْجُهَنِيَّ، أَرْسَلَهُ إِلَى أَبِي جُهَيْمٍ يَسْأَلُهُ مَاذَا سَمِعَ مِنْ، رَسُولِ اللَّهِ صلى الله عليه وسلم فِي الْمَارِّ بَيْنَ يَدَىِ الْمُصَلِّي فَقَالَ أَبُو جُهَيْمٍ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لَوْ يَعْلَمُ الْمَارُّ بَيْنَ يَدَىِ الْمُصَلِّي مَاذَا عَلَيْهِ لَكَانَ أَنْ يَقِفَ أَرْبَعِينَ خَيْرًا لَهُ مِنْ أَنْ يَمُرَّ بَيْنَ يَدَيْهِ " . قَالَ أَبُو النَّضْرِ لاَ أَدْرِي أَقَالَ أَرْبَعِينَ يَوْمًا أَوْ شَهْرًا أَوْ سَنَةً .
also referenced under: Book 9, Hadith 366 (In-Book)