It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that he said: I was sitting with Sayyiduna Umar bin al-Khattab (may Allah be pleased with him), and he said to me: "O Ibn Abbas, have you heard anything from the Messenger of Allah (peace and blessings be upon him) that he commanded a Muslim to do when he forgets in his prayer, what he should do?" I said: "No, by Allah. O Commander of the Believers, have you not heard anything from the Messenger of Allah (peace and blessings be upon him) about this?" He said: "No, by Allah." While we were in this conversation, Sayyiduna Abd al-Rahman bin Awf (may Allah be pleased with him) came and asked: "What are you two engaged in?" Sayyiduna Umar (may Allah be pleased with him) told him that he had asked him this question. Sayyiduna Abd al-Rahman (may Allah be pleased with him) said: "But I have heard the Messenger of Allah (peace and blessings be upon him) give a command about this." Sayyiduna Umar (may Allah be pleased with him) said: "You are trustworthy in our view, so what did you hear from the Messenger of Allah (peace and blessings be upon him)?" He said: I heard the Messenger of Allah (peace and blessings be upon him) say: "When one of you forgets in his prayer, so that he does not know whether he has prayed more or less, then if he is in doubt between one and two, let him count it as one; if he is in doubt between two and three, let him count it as two; and if he is in doubt between three and four, let him count it as three, so that the uncertainty is in the excess. Then let him perform two prostrations while sitting before giving the salam, and then give the salam."
Hadith Referenceمسند أبي يعلى الموصلي / من مسند عبد الرحمن بن عوف / 839
Hadith Gradingمحدثین:إسناده صحيح
Hadith Takhrij«حکم الحدیث مسند ابی یعلی محققاً تنسیق حسين سليم أسد - مکتبہ شاملہ :قال حسين سليم أسد: إسناده صحيح . » «قال سعيد بن محمد السناري: ضعيف: بهذا اللفظ» «أخرجه سنن الترمذي برقم: 398، وأخرجه سنن ابن ماجه برقم: 1209، وأخرجه مسند أحمد برقم: 1659، وأخرجه المستدرك على الصحيحين برقم: 1251، 1253، وأخرجه شرح معاني الآثار برقم: 2517، وأخرجه شرح السنة برقم: 755، مسند ابویعلیٰ ترقیم الاثری: 834»