It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that a man died whom the Messenger of Allah (peace and blessings be upon him) used to visit in his illness, and he was buried that very night. When morning came, he (peace and blessings be upon him) was informed of his death, and he (peace and blessings be upon him) said: "What prevented you from informing me?" They said: "It was a dark night, so we did not wish to put you to hardship." Then he (peace and blessings be upon him) came to his grave and offered the funeral prayer.
Imam al-Bukhari (may Allah have mercy on him) narrated it in his Sahih from Muhammad, from Abu Mu'awiyah, and Imam Muslim (may Allah have mercy on him) narrated it in abridged form through another chain from al-Shaybani.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6909