Jami' at-Tirmidhi

(Another chain) with similar narration. He [At-Tirmidhi] said: This is how Shu'bah reported this Hadith from IbnAbi Laila, and he said: "From Abu Ayyub from the Prophet (ﷺ)." Ibn Abi Laila was confused in this narration, sometimes he would say: "From Abu Ayyub from the Prophet (ﷺ)" and sometimes he would say: "From 'Ali from the Prophet (ﷺ)" similarly in meaning.

حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنِ ابْنِ أَبِي لَيْلَى، بِهَذَا الإِسْنَادِ نَحْوَهُ ‏.‏ قَالَ هَكَذَا رَوَى شُعْبَةُ، هَذَا الْحَدِيثَ عَنِ ابْنِ أَبِي لَيْلَى، عَنْ أَبِي أَيُّوبَ، عَنِ النَّبِيِّ صلى الله عليه وسلم ‏.‏ وَكَانَ ابْنُ أَبِي لَيْلَى يَضْطَرِبُ فِي هَذَا الْحَدِيثِ يَقُولُ أَحْيَانًا عَنْ أَبِي أَيُّوبَ عَنِ النَّبِيِّ صلى الله عليه وسلم وَيَقُولُ أَحْيَانًا عَنْ عَلِيٍّ عَنِ النَّبِيِّ صلى الله عليه وسلم ‏.‏