The Messenger of Allah ﷺ led us in a prayer, and we were not sure whether he had added something or left something out. He asked us about it, and we told him what had happened. He then drew his leg back, faced the qiblah, and performed two prostrations, then gave the closing salutation. After that he turned his face toward us and said, "If anything new had occurred regarding the prayer, I would have informed you of it. But I am only a human being. I forget just as you forget. So when I forget, remind me. And whichever of you is uncertain during his prayer, let him strive for what is closest to being correct, complete his prayer on that basis, give the closing salutation, and then perform two prostrations."
حدثنا محمد بن بشار حدثنا محمد بن جعفر حدثنا شعبة عن منصور قال شعبة كتب إلي وقرأته عليه قال أخبرني إبراهيم عن علقمة
صلى رسول الله ﷺ صلاة لا ندري أزاد أو نقص فسأل فحدثناه فثنى رجله واستقبل القبلة وسجد سجدتين ثم سلم ثم أقبل علينا بوجهه فقال لو حدث في الصلاة شيء لأنبأتكموه وإنما أنا بشر أنسى كما تنسون فإذا نسيت فذكروني وأيكم ما شك في الصلاة فليتحر أقرب ذلك من الصواب فيتم عليه ويسلم ويسجد سجدتين
Reported by Bukhari, in "Prayer," chapter "Facing the qibla wherever one may be," hadith no. 401, and Muslim, in "Mosques," the previous chapter, hadith no. 572, from the hadith of Mansur, through this same chain.