It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that I heard the Prophet (peace and blessings be upon him) say: "Avoid three accursed acts." The Companions (may Allah be pleased with them) asked: O Messenger of Allah! What are those three acts? He said: "That one of you relieves himself (defecates or urinates) in a shaded place where people take shade, or in a pathway, or at a place where water flows."
Hadith Referenceمسند احمد / ومن مسند بني هاشم / 2715
Hadith Gradingحکم دارالسلام:حسن لغيره، وهذا إسناد ضعيف، لابهام راويه عن ابن عباس