Al-Hasan (may Allah have mercy on him) says that Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) gave his wife one divorce while she was menstruating, then intended to follow it with the remaining two divorces at the two remaining periods. The matter reached the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) said: "Allah did not command you like this; you have gone against the Sunnah. The Sunnah is that you wait for the state of purity and divorce at each period of purity." He says: The Prophet (peace and blessings be upon him) ordered me to take her back, and said: "When she becomes pure, divorce or keep her." I said: O Messenger of Allah (peace and blessings be upon him)! What is your view: if I had given her three divorces, would it be lawful for me to take her back? He (peace and blessings be upon him) said: "She would be separated from you, and it would be a sin."
These additions are narrated from Ata' al-Khurasani and are not in anyone else's narration, and the scholars have criticised him. It seems that his words "and it would be a sin" refer to his pronouncing the three divorces in the state of menstruation; and Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 14939