The Messenger of Allah ﷺ said, "When any of you is uncertain during his prayer, let him seek out what is correct, then perform two prostrations."Tanafisi said, "This is the foundational principle, and no one is able to refute it."
حدثنا علي بن محمد حدثنا وكيع عن مسعر عن منصور عن إبراهيم عن علقمة
قال رسول الله ﷺ إذا شك أحدكم في الصلاة فليتحر الصواب ثم يسجد سجدتين قال الطنافسي هذا الأصل ولا يقدر أحد يرده