حَدَّثَنَا مُحَمَّدُ بْنُ يَحْيَى، حَدَّثَنَا عَمْرُو بْنُ أَبِي سَلَمَةَ، عَنْ زُهَيْرٍ، قَالَ قَالَ سَالِمٌ سَمِعْتُ الْحَسَنَ، يَقُولُ حَدَّثَنَا جَابِرُ بْنُ عَبْدِ اللَّهِ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏"‏ إِيَّاكُمْ وَالتَّعْرِيسَ عَلَى جَوَادِّ الطَّرِيقِ وَالصَّلاَةَ عَلَيْهَا فَإِنَّهَا مَأْوَى الْحَيَّاتِ وَالسِّبَاعِ وَقَضَاءَ الْحَاجَةِ عَلَيْهَا فَإِنَّهَا مِنَ الْمَلاَعِنِ ‏"‏ ‏.‏

It was narrated that Jabir bin 'Abdullah said: "The Messenger of Allah said: 'Beware of stopping to rest and praying in the middle of the road, for it is the refuge of snakes and carnivorous animals, and beware of relieving yourselves in the middle of the road, for this is an act that provokes curses.'" Translation Not Available

Book Ref: Sunan Ibn Majah Book 1 Hadith 329
Web Ref:  Sunan Ibn Majah Vol 1 Book 1 Hadith 329