[Machine] I heard from the Messenger of Allah or one of his companions, "When a man is uncertain about his prayer, what should he do?" He said, "While in this state, Abdullah ibn Awf approached and asked, 'Who are you two?'" Umar said, "I asked this young man if he had heard from the Messenger of Allah or any of his companions, what should one do when uncertain about their prayer?" Abdullah ibn Awf said, "I heard the Messenger of Allah say, 'If one of you is uncertain about their prayer and does not know whether they have prayed one or two (units), then let them make it one. And if they do not know whether they have prayed two or three, then let them make it two. And if they do not know whether they have prayed three or four, then let them make it three. Then let them prostrate when they finish their prayer while seated before they give the salutations with two prostrations.'"
سَمِعْتَ مِنْ رَسُولِ اللهِ ﷺ أَوْ مِنْ أَحَدٍ مِنْ أَصْحَابِهِ إِذَا شَكَّ الرَّجُلُ فِي صَلاتِهِ مَاذَا يَصْنَعُ؟ قَالَ فَبَيْنَا هُوَ كَذَلِكَ إِذِ اقْبَلَ عَبْدُ الرَّحْمَنِ بْنُ عَوْفٍ فَقَالَ فِيمَ أَنْتُمَا؟فَقَالَ عُمَرُ سَأَلْتُ هَذَا الْغُلامَ هَلْ سَمِعَ مِنْ رَسُولِ اللهِ ﷺ أَوْ أَحَدٍ مِنْ أَصْحَابِهِ إِذَا شَكَّ الرَّجُلُ فِي صَلاتِهِ مَاذَا يَصْنَعُ؟ فَقَالَ عَبْدُ الرَّحْمَنِ سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ إِذَا شَكَّ أَحَدُكُمْ فِي صَلاتِهِ فَلَمْ يَدْرِ أَوَاحِدَةً صَلَّى أَمْ ثِنْتَيْنِ؟ فَلْيَجْعَلْهَا وَاحِدَةً وَإِذَا لَمْ يَدْرِ ثِنْتَيْنِ صَلَّى أَمْ ثَلاثًا؟ فَلْيَجْعَلْهَا ثِنْتَيْنِ وَإِذَا لَمْ يَدْرِ أَثَلاثًا صَلَّى أَمِ ارْبَعًا؟ فَلْيَجْعَلْهَا ثَلاثًا ثُمَّ يَسْجُدِ اذَا فَرَغَ مِنْ صَلاتِهِ وَهُوَ جَالِسٌ قَبْلَ أَنْ يُسَلِّمَ سَجْدَتَيْنِ