Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) narrates that when Abdullah bin Ubayy fell into the illness in which he died, the Prophet (peace and blessings be upon him) came to him, and the two of them had some conversation. Then Abdullah said: "I have understood what you are saying. Do me a favour: shroud me in your shirt and lead my funeral prayer." So the Prophet (peace and blessings be upon him) shrouded him in that same shirt of his and led his funeral prayer. Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: "Allah knows best what kind of prayer it was, and Muhammad (peace and blessings be upon him) never deceived any human being."
Related hadith on this topic