It is narrated from Hazrat Aisha (may Allah be pleased with her) that I heard the Prophet (peace and blessings be upon him) say: No person should offer prayer when food has been served before him, or while suppressing the urge to urinate or defecate.
Hadith Referenceمسند احمد / مسند النساء / 24270
Hadith Gradingحکم دارالسلام:حديث صحيح وهو مكرر: 24166