It is narrated from Sayyiduna Abu Qatadah (may Allah be pleased with him) that when the Messenger of Allah (peace and blessings be upon him) was called for the funeral prayer, he (peace and blessings be upon him) would inquire about the deceased. If good things were said about him, then he (peace and blessings be upon him) would perform his funeral prayer. But if the opposite was said, then he (peace and blessings be upon him) would say: "You do whatever you wish for him yourselves." And he (peace and blessings be upon him) would not perform his funeral prayer.
Hadith Referenceالفتح الربانی / أبواب صلاة الجنازة / 3157
Hadith Gradingمحدثین:صحیح
Hadith Takhrij«اسناده صحيح علي شرط الشيخين أخرجه ابن حبان: 3057، وعبد بن حميد: 196، والحاكم:1/ 364 ، (انظر مسند أحمد ترقيم الرسالة: 22555 ترقیم بيت الأفكار الدولية: 22922»
Brief Explanation
Benefits: … The Prophet sallallahu alayhi wa sallam did not perform the funeral prayer (salat al-janazah) for the one who committed treachery, nor for the one who committed suicide, and in the beginning, he would also not perform the funeral prayer for one who was in debt. In this hadith, what is meant by "contrary matters" are which deficiencies?