The Prophet ﷺ said, "When one of you is uncertain about his prayer, let him cast aside the doubt and build upon what he is certain of, then perform two prostrations. If he has prayed five units, these two prostrations will make them an even number, and if he has prayed four, they will be a humiliation for Satan."
حدثنا علي بن عياش حدثنا محمد بن مطرف حدثنا زيد بن أسلم عن عطاء بن يسار
قال النبي ﷺ إذا شك أحدكم في صلاته فليلق الشك وليبن على اليقين وليصل سجدتين فإن كانت خمسا شفع بهما وإن كان صلى أربعا كانتا ترغيما للشيطان