Funerals (Al-Janaa'iz)
حَدَّثَنَا يَعْقُوبُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا يَحْيَى بْنُ أَبِي بُكَيْرٍ، حَدَّثَنَا زَائِدَةُ، حَدَّثَنَا أَبُو إِسْحَاقَ الشَّيْبَانِيُّ، عَنْ عَامِرٍ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ قَالَ أَتَى رَسُولُ اللَّهِ صلى الله عليه وسلم قَبْرًا، فَقَالُوا هَذَا دُفِنَ، أَوْ دُفِنَتِ الْبَارِحَةَ. قَالَ ابْنُ عَبَّاسٍ ـ رضى الله عنهما ـ فَصَفَّنَا خَلْفَهُ ثُمَّ صَلَّى عَلَيْهَا.Narrated 'Amir:Ibn `Abbas (who was at that time a boy) said, "Allah's Messenger (ﷺ) came to a grave and the people said, 'He or she was buried yesterday.' " Ibn `Abbas added, "We aligned behind the Prophet (ﷺ) and he led the funeral prayer of the deceased
From Sahih al-Bukhari, whose reports the scholars accept as authentic.