Zayd bin Khalid sent him to Abu Juhaym to ask what he had heard from the Messenger of Allah ﷺ regarding 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.'"
أخبرنا قتيبة عن مالك عن أبي النضر
أن زيد بن خالد أرسله إلى أبي جهيم يسأله ماذا سمع من رسول الله ﷺ يقول في المار بين يدي المصلي فقال أبو جهيم قال رسول الله ﷺ لو يعلم المار بين يدي المصلي ماذا عليه لكان أن يقف أربعين خيرا له من أن يمر بين يديه
Sourced from Bukhari, Prayer, Chapter on the sin of one who passes in front of a person praying, no. 510, and Muslim, Prayer, Chapter on preventing one who passes in front of a person praying, no. 507, both from the hadith of Malik through the same chain. It is also found in Muwatta (Yahya): 1/154, and in Kubra, no. 832.