It wasnarrated from 'Uqbah bin 'Amir that the Messenger of Allah(ﷺ)said:
'If I were to walk on a live coal or a sword, or if I weretosew shows to my feet, that would be better for me than walking onthegrave of a Muslim. And I see no difference between relievingmyselfin the midst of graves or in the middle of the marketplace." (JA)
English reference (JA): Vol. 1, Book 6, Hadith 1567 (JA)
Arabic reference (JA): Book 6, Hadith 1634 (JA)