The Prophet ﷺ said, "When one of you prays, let him place something in front of him. If he cannot find anything, let him set up a stick. If he cannot find that either, let him draw a line. Then nothing that passes in front of him will harm his prayer."
حدثنا بكر بن خلف أبو بشر حدثنا حميد بن الأسود حدثنا إسمعيل بن أمية ح و حدثنا عمار بن خالد حدثنا سفيان بن عيينة عن إسمعيل بن أمية عن أبي عمرو بن محمد بن عمرو بن حريث عن جده حريث بن سليم
عن النبي ﷺ قال إذا صلى أحدكم فليجعل تلقاء وجهه شيئا فإن لم يجد فلينصب عصا فإن لم يجد فليخط خطا ثم لا يضره ما مر بين يديه
daif] Abu Dawud reported it in the Book of Salah, Chapter: the line when one does not find a staff, hadith no. 689, 690. Takhrij, from the hadith of Ismail, and Ibn Khuzayma and Ibn Hibban graded it sahih, while Sufyan bin Uyayna, Tahawi, Daraqutni, Baghawi in Sharh al-Sunnah, and others graded it daif, and that is correct.