عَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ صَلَّى عَلَى صَاحِبِ قَبْرٍ بَعْدَ مَا دُفِنَ
It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) offered the funeral prayer for a person in the grave after he had been buried.