The Messenger of Allah ﷺ led a prayer, and I do not know whether he added or omitted something in it. When he gave the salam, he was asked, "Messenger of Allah, has something occurred in the prayer?"He replied, "No, why do you ask?"They said, "You prayed in such and such a manner."So he tucked his legs and performed two prostrations of forgetfulness. After giving the salam, he said, "I am only a human being. I forget just as you forget. So when one of you is uncertain about his prayer, let him strive to determine what is correct, complete his prayer, give the salam, and then perform two prostrations."
حدثنا جرير عن منصور عن إبراهيم عن علقمة
صلى رسول الله ﷺ صلاة فلا أدري زاد أم نقص فلما سلم قيل له يا رسول الله هل حدث في الصلاة شيء قال لا وما ذاك قالوا صليت كذا وكذا قال فثنى رجليه فسجد سجدتي السهو فلما سلم قال إنما أنا بشر أنسى كما تنسون وإذا شك أحدكم في الصلاة فليتحر الصلاة فإذا سلم فليسجد سجدتين