All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
Al-Bukhari narrated that Jaabir said that the Prophet “came to (the grave of) `Abdullah ibn Ubayy after his body was buried, so he brought his body out, blew his saliva over the body, and clothed him in his shirt.” [Al-Bukhari]
Al-Bukhari also narrated that Ibn `Umar said that when `Abdullah ibn Ubayy died, his son `Abdullah ibn `Abdullah came to the Prophet and asked him to give him his shirt in order to shroud his father in it, so he gave it to him, and then he (`Abdullah) asked him (the Prophet) to offer the funeral prayer for his father. The Prophet got up to offer the funeral prayer for him, but `Umar got up and got hold of the garment of the Prophet and said, “O Messenger of Allah! Will you offer the funeral prayer for him though your Lord has forbidden you to offer the prayer for him?!” The Prophet said, “Allah has given me the choice by saying: {Ask forgiveness for them [O Muhammad] or do not ask forgiveness for them. If you should ask forgiveness for them seventy times - never will Allah forgive them...} [Quran 9:80] so I will ask forgiveness for him more than seventy times.” `Umar said, “But he (`Abdullah ibn Ubayy) is a hypocrite!” However, the Prophet did offer the funeral prayer for him, whereupon Allah revealed: {And do not pray [the funeral prayer, O Muhammad] over any of them who has died - ever - or stand at his grave.}” [Quran 9:84]
Subul as-Salaam (1/474) by As-San’aani reads:
“The apparent meaning of this narration (of Ibn `Umar) is that he had asked him for the shirt before enshrouding him, but this meaning is contradicted by what is reported by Al-Bukhari and narrated by Jaabir, who said that, 'he came to`Abdullah ibn Ubayy after he was buried, so he brought his body out, blew his saliva over the body, and clothed him in his shirt.' This explicitly means that giving the shirt and enshrouding him took place after the burial, while the hadeeth of Ibn ‘Umar contradicts it. These two ahaadeeth were reconciled by saying that what is intended in the hadeeth of Ibn `Umar by ‘so he gave him’ is that he granted him his request (he agreed to it), so the word 'gave' was mentioned as a metaphor to indicate that what he asked for happened, and the same thing applies to the phrase in the hadeeth of Jaabir, ‘after he was buried’; it may mean after he was lowered into his grave or that what happened after he was taken out of the grave was just the blowing (of the saliva).”
Allah knows best.