The Messenger of Allah ﷺ prayed the noon prayer, then turned his face toward them. They said, "Has something new happened concerning the prayer?"He asked, "What is that?"They informed him of what he had done. So he folded his leg, faced the qiblah, and performed two prostrations, then gave the salam. Then he turned his face toward them and said, "I am only a human being. I forget as you forget. So when I forget, remind me." He added, "If something new had happened concerning the prayer, I would have informed you of it." And he said, "When one of you is uncertain in his prayer, let him seek out what is closest to being correct, then complete his prayer upon that, then perform two prostrations."
أخبرنا إسمعيل بن مسعود قال حدثنا خالد بن الحارث عن شعبة قال كتب إلي منصور وقرأته عليه وسمعته يحدث رجلا عن إبراهيم عن علقمة
أن رسول الله ﷺ صلى صلاة الظهر ثم أقبل عليهم بوجهه فقالوا أحدث في الصلاة حدث قال وما ذاك فأخبروه بصنيعه فثنى رجله واستقبل القبلة فسجد سجدتين ثم سلم ثم أقبل عليهم بوجهه فقال إنما أنا بشر أنسى كما تنسون فإذا نسيت فذكروني وقال لو كان حدث في الصلاة حدث أنبأتكم به وقال إذا أوهم أحدكم في صلاته فليتحر أقرب ذلك من الصواب ثم ليتم عليه ثم يسجد سجدتين
[Sahih] Reported by Muslim, no. 572, from the hadith of Shubah, through the same chain (see the earlier hadith, no. 1241), and it is found in Al-Kubra, no. 1167.