The Messenger of Allah ﷺ said, "When one of you prays and becomes uncertain about his prayer, if he doubts whether he prayed one rakah or two, let him count it as one. If he doubts whether he prayed two or three, let him count it as two. If he doubts whether he prayed three or four, let him count it as three, so that the uncertainty falls on the side of having prayed more. Then let him perform two prostrations before giving the salam, and then give the salam."Muhammad bin Ishaq said, Husayn bin Abdullah asked me, "Did he give you a connected chain for it?"I replied, "No."He said, "But he narrated to me that Kurayb, the freed slave of Ibn Abbas, told him from Ibn Abbas, who said, I was sitting with Umar bin Khattab when he said, 'Ibn Abbas, when a man becomes uncertain in his prayer and does not know whether he prayed too much or too little, what should he do?'I answered, 'By Allah, Commander of the Believers, I do not know. I have not heard anything about that.'Umar said, 'By Allah, I do not know either.'While we were in this discussion, Abdul-Rahman bin Awf came in and asked, 'What are you two discussing?'Umar said to him, 'We were talking about a man who becomes uncertain in his prayer. What should he do?'He replied, 'I heard the Messenger of Allah ﷺ say,' and he then narrated this hadith."
حدثنا إسماعيل حدثنا محمد بن إسحاق
أن رسول الله ﷺ قال إذا صلى أحدكم فشك في صلاته فإن شك في الواحدة والثنتين فليجعلهما واحدة وإن شك في الثنتين والثلاث فليجعلهما ثنتين وإن شك في الثلاث والأربع فليجعلهما ثلاثا حتى يكون الوهم في الزيادة ثم يسجد سجدتين قبل أن يسلم ثم يسلم قال محمد بن إسحاق وقال لي حسين بن عبد الله هل أسنده لك فقلت لا فقال لكنه حدثني أن كريبا مولى ابن عباس حدثه عن ابن عباس قال جلست إلى عمر بن الخطاب فقال يا ابن عباس إذا اشتبه على الرجل في صلاته فلم يدر أزاد أم نقص قلت والله يا أمير المؤمنين ما أدري ما سمعت في ذلك شيئا فقال عمر والله ما أدري قال فبينا نحن على ذلك إذ جاء عبد الرحمن بن عوف فقال ما هذا الذي تذاكران فقال له عمر ذكرنا الرجل يشك في صلاته كيف يصنع فقال سمعت رسول الله ﷺ يقول هذا الحديث
This chain is daif due to the weakness of Husayn bin Abdullah, whom we discussed previously at 39, but the hadith has already appeared without his mention at 1656, where we graded it sahih, and we referred to our verification there, having graded it sahih in detail in our commentary on Tirmidhi. See also 1689. As for "when Abdul-Rahman came," in k it reads, "when Abdul-Rahman came to us."