If somebody vowed during the Pre-Islamic Period of Ignorance, and then he embraces Islam
باب إِذَا نَذَرَ أَوْ حَلَفَ أَنْ لاَ يُكَلِّمَ إِنْسَانًا فِي الْجَاهِلِيَّةِ ثُمَّ أَسْلَمَ
Sahih al-Bukhari, Book of Oaths and Vows(view book)
Sahih al-Bukhari 6697
Narrated Ibn 'Umar:
'Umar said "O Allah's Apostle! I vowed to perform I'tikaf for one night in Al-Masjid-al-Haram, during the Pre-Islamic Period of ignorance (before embracing Islam). "The Prophet ﷺ said, "Fulfill your vow." Ibn 'Umar said to the lady, "Pray on her behalf." Ibn 'Abbas said the same.
حَدَّثَنَا مُحَمَّدُ بْنُ مُقَاتِلٍ أَبُو الْحَسَنِ، أَخْبَرَنَا عَبْدُ اللَّهِ، أَخْبَرَنَا عُبَيْدُ اللَّهِ بْنُ عُمَرَ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ عُمَرَ، قَالَ يَا رَسُولَ اللَّهِ إِنِّي نَذَرْتُ فِي الْجَاهِلِيَّةِ أَنْ أَعْتَكِفَ لَيْلَةً فِي الْمَسْجِدِ الْحَرَامِ. قَالَ " أَوْفِ بِنَذْرِكَ ".
Classification
Sahih (Authentic)