Sunan Ibn Majah, Book 11, Hadith 2218 (In-Book)

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."

حَدَّثَنَا مُحَمَّدُ بْنُ يَحْيَى، حَدَّثَنَا إِسْحَاقُ بْنُ مُحَمَّدٍ الْفَرْوِيُّ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ عُمَرَ، عَنْ عُبَيْدِ اللَّهِ بْنِ عُمَرَ، عَنْ عَطَاءٍ، عَنِ ابْنِ عَبَّاسٍ، أَنَّ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ مَرَّ بِرَجُلٍ بِمَكَّةَ وَهُوَ قَائِمٌ فِي الشَّمْسِ فَقَالَ ‏"‏ مَا هَذَا ‏"‏ ‏.‏ قَالُوا نَذَرَ أَنْ يَصُومَ وَلاَ يَسْتَظِلَّ إِلَى اللَّيْلِ وَلاَ يَتَكَلَّمَ وَلاَ يَزَالَ قَائِمًا ‏.‏ قَالَ ‏"‏ لِيَتَكَلَّمْ وَلْيَسْتَظِلَّ وَلْيَجْلِسْ وَلْيُتِمَّ صِيَامَهُ ‏"‏ ‏.‏

sunnah.com