Sunan Ibn Majah
618
Daif+3

It was narrated that Abu Hurairah said:"The Messenger of Allah said, 'No one of you should stand to pray when he feels some discomfort (because of needing to urinate or defecate)

DaifAl-Albani
SahihMuhammad Fouad Abd al-Baqi