On it being forbidden to pass in front of someone praying

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

343. Chapter: On it being forbidden to pass in front of someone praying

1758. Abu Juhaym 'Abdullah ibn al-Harith ibn as-Simma al-Ansari said that the Messenger of Allah, may Allah bless him and grant him peace, had said, "If the person passing in front of the man praying knew what he was incurring, he would find it preferable to wait forty rather than pass in front of him." The narrator said, "I do not know whether he said forty days or forty months or forty years." [Agreed upon]