Compiled by Imam Yahya ibn Sharaf al-Nawawi
عن أبي الجهيم عبد الله بن الحارث بن الصمة الأنصاري رضي الله عنه قال: قال رسول الله صلى الله عليه وسلم : "لو يعلم المار بين المصلي ماذا عليه لكان أن يقف أربعين خيرًا له من أن يمر بين يديه" ((قال الراوي: لا أدري قال أربعين يومًا، أو أربعين شهرًا، أو أربعين سنة)). ((متفق عليه)).
The Messenger of Allah (ﷺ) said, "If the person who passes in front of a praying person, realizes the enormity of the sinfulness of this act, it will have been better for him to wait forty than to pass in front of him."[Al-Bukhari and Muslim].[The narrator was not sure whether the Prophet (ﷺ) said forty days, months or years.]