It was narrated from Ibn Abbas that the :
Messenger of Allah (ﷺ) passed by a man in Makkah who was standing in the sun. He said: "What is this?" They said: "He vowed to fast and not to seek shade until night comes, and not to speak, and to remain standing." He said: "Let him speak and seek shade and let him sit down, but let him complete his fast."Another chain from Ibn 'Abbas, from the Prophet (ﷺ), with similar wording. expiation for breaking an oath."
English reference: Vol. 3, Book 11, Hadith 2136
Arabic reference: Book 11, Hadith 2218