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)۔
Narrated from Aisha (may Allah be pleased with her) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever makes a vow to obey Allah, let him obey Allah; and whoever makes a vow to disobey Allah, let him not disobey Him."
Hadith Referenceمسند الإمام الشافعي / كتاب النذور / 1044
Hadith Takhrijاخرجه البخاري، الأيمان والنذور، باب النذر في الطاعة، وما انفقتم من نفقة أو نذر تم من نذر (6696) ، (6700)۔