"إذا سهَا الإمامُ فاستتَمَّ قَائِمًا فعليه سجدْتَا السّهْو، وإذا لمْ يَسْتتِمَّ قَائِمًا فلا سَهْوَ علَيه" .
“The Messenger of Allah ﷺ said: ‘If anyone of you stands after two Rak’ah, if he has not yet stood up fully, let him sit down again, but if he has stood up fully, then let him not sit down, and let him perform two prostrations for forgetfulness (Sahw).’” (Using translation from Ibn Mājah 1208)
قَالَ رَسُولُ اللهِ ﷺ إِذَا قَامَ أَحَدُكُمْ فَلَمْ يَسْتَتِمَّ قَائِمًا فَلْيَجْلِسْ وَإِذَا اسْتَتَمَّ قَائِمًا فَلَا يَجْلِسْ وَيَسْجُدُ سَجْدَتَيِ السَّهْوِ
[Machine] The Messenger of Allah ﷺ said, "If the imam makes a mistake and rectifies it while standing, then he should perform the two prostrations of forgetfulness. But if he does not rectify it while standing, then there is no obligation upon him for prostrations of forgetfulness."
قَالَ رَسُولُ اللهِ ﷺ «إِذَا سَهَا الْإِمَامُ فَاسْتَتَمَّ قَائِمًا فَعَلَيْهِ سَجْدَتَا السَّهْوِ وَإِذَا لَمْ يَسْتَتِمَّ قَائِمًا فَلَا سَهْوَ عَلَيْهِ»