It is narrated from Tawus that the Prophet ﷺ passed by Abu Israil, who was standing in the sun. The Prophet ﷺ asked, "What is the matter with him?" The people said, "He has vowed that he will not go into the shade, nor sit down, nor speak to anyone, and that he will fast." So the Prophet ﷺ ordered him to seek shade, to sit down, and to speak to people, and to complete his fast, and he did not order him to offer any expiation.
Hadith Referenceمسند الإمام الشافعي / كتاب النذور / 1043
Hadith Takhrijصحيح من غير هذا الطريق : اخرجه البخاري، الأيمان والنذور، باب النذر فيما لا يملك وفي معصية (6704)۔