Sila bin Zufar said: We were with Sayyiduna Ammar bin Yasir (may Allah be pleased with him) when he brought a roasted goat and said: Eat. A man withdrew and said: I am fasting. Sayyiduna Ammar bin Yasir (may Allah be pleased with him) said: Whoever fasts on the day of doubt has disobeyed Abul Qasim (peace and blessings be upon him).
Brief Explanation
(Commentary on Hadith 1719)
Most likely, this was the thirtieth of Sha'ban, and there was doubt and uncertainty regarding the sighting of the crescent moon. And the Messenger of Allah (sallallahu alayhi wa sallam) has prohibited fasting on such a day of doubt, as is mentioned in Ibn Majah. Therefore, whoever fasted in a state of doubt has disobeyed Muhammad (sallallahu alayhi wa sallam).