Hafs reported that the Messenger of Allah ﷺ said, "It cuts off a man's prayer."In the version from Sulayman, Abu Dharr said, "A man's prayer is cut off, if there is not before him something the height of the back of a saddle, by a donkey, a black dog, and a woman."I asked, "What distinguishes the black one from the red, the yellow, or the white?"He replied, "Nephew, I asked the Messenger of Allah ﷺ just as you have asked me, and he said, 'The black dog is a devil.'"
حدثنا حفص بن عمر حدثنا شعبة ح و حدثنا عبد السلام بن مطهر وابن كثير المعنى أن سليمان بن المغيرة أخبرهم عن حميد بن هلال عن عبد الله بن الصامت
حفص قال قال رسول الله ﷺ يقطع صلاة الرجل وقال عن سليمان قال أبو ذر يقطع صلاة الرجل إذا لم يكن بين يديه قيد آخرة الرحل الحمار والكلب الأسود والمرأة فقلت ما بال الأسود من الأحمر من الأصفر من الأبيض فقال يا ابن أخي سألت رسول الله ﷺ كما سألتني فقال الكلب الأسود شيطان
Muslim recorded it in the Book of Prayer, chapter on the extent of what a person praying should place before him as a barrier, hadith no. 510, from the hadith of Shubah and from the hadith of Sulayman bin Mughira through the same chain.