All perfect praise be to Allaah, the Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
First of all, whoever was about to do an act which breaks fasting, while being ignorant of the fact that it breaks fasting and then abstains from doing it in the fear that it might break fasting, then he does not have to make up for that fast based on the opinion that being about to break fast does not lead to breaking it unless one has a decisive intention to break fasting. Thus, being about to do an act that would break the fast does not in and of itself break the fast.
Secondly, whoever did anything that would break fasting, while being ignorant of the fact that it breaks fasting, would not be regarded to have broken his fasting because of it, according to the most correct opinion (of the scholars).
Shaykh Al-Islam Ibn Taymiyah said, "If a fasting person does what breaks fasting, while being ignorant of its being prohibited, then would making up for that fast be due on him? Two opinions are provided by the Hanbali school of Fiqh, and according to the most correct of the two opinions, he does not have to make up for that fast because religious obligations are not established except after they are conveyed (i.e. after being known to people), as stated by the verse (that means):
Ibn Al-Qayyim said in his "I'laam Al-Muwaqqi‘een", "The Prophet, sallallaahu ‘alayhi wa salam, forgave a person who ate or drank during the day of fasting, intentionally, and not forgetfully, because he understood the Saying of Allaah (which means): {until the white thread of dawn becomes distinct to you from the black thread [of night]} [Quran 2:187] as referring to two customary ropes, therefore he went on eating until the black rope and the white ropes became visible to him in the morning light. The Prophet, sallallaahu ‘alayhi wa sallam, did not reprimand him for that and did not command him to make up for that day because he had done that based on his incorrect interpretation of the verse."
Subsequently, neither a make up fast nor expiation is due on the one who did so.
Allaah Knows best.