(29) باب إِذَا نَذَرَ أَوْ حَلَفَ أَنْ لاَ يُكَلِّمَ إِنْسَانًا فِي الْجَاهِلِيَّةِ ثُمَّ أَسْلَمَ
Narrated Ibn `Umar:
`Umar said "O Allah's Messenger (ﷺ)! 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.
Reference: Sahih al-Bukhari 6697
In-book reference: Book 83, Hadith 74
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 8, Book 78, Hadith 688