Umar said to him, "Young man, have you heard anything from the Messenger of Allah ﷺ or from any of his companions about what a man should do when he becomes uncertain during his prayer?"While they were in this conversation, Abdul-Rahman bin Awf came along and asked, "What are you two discussing?"Umar replied, "I was asking this young man whether he had heard from the Messenger of Allah ﷺ or from any of his companions what a man should do when he becomes uncertain during his prayer."Abdul-Rahman said, "I heard the Messenger of Allah ﷺ say, 'When one of you is uncertain in his prayer and does not know whether he has prayed one rakah or two, let him count it as one. If he does not know whether he has prayed two or three, let him count it as two. If he does not know whether he has prayed three or four, let him count it as three. Then, when he has finished his prayer, let him perform two prostrations while sitting, before giving the salam.'"
حدثنا إبراهيم بن سعد حدثني محمد بن إسحاق عن مكحول عن كريب
له عمر يا غلام هل سمعت من رسول الله ﷺ أو من أحد من أصحابه إذا شك الرجل في صلاته ماذا يصنع قال فبينا هو كذلك إذ أقبل عبد الرحمن بن عوف فقال فيم أنتما فقال عمر سألت هذا الغلام هل سمعت من رسول الله ﷺ أو أحد من أصحابه إذا شك الرجل في صلاته ماذا يصنع فقال عبد الرحمن سمعت رسول الله ﷺ يقول إذا شك أحدكم في صلاته فلم يدر أواحدة صلى أم ثنتين فليجعلها واحدة وإذا لم يدر ثنتين صلى أم ثلاثا فليجعلها ثنتين وإذا لم يدر أثلاثا صلى أم أربعا فليجعلها ثلاثا ثم يسجد إذا فرغ من صلاته وهو جالس قبل أن يسلم سجدتين