Bulugh al-Maram
Book 2, Hadith 335
وَعَنْ عَلِيٍّ - رضى الله عنه - قَالَ: قَالَ اَلنَّبِيُّ - صلى الله عليه وسلم -{ إِذَا أَتَى أَحَدُكُمْ اَلصَّلَاةَ وَالْإِمَامُ عَلَى حَالٍ, فَلْيَصْنَعْ كَمَا يَصْنَعُ اَلْإِمَامُ } رَوَاهُ اَلتِّرْمِذِيُّ بِإِسْنَادٍ ضَعِيفٍ . 1 .1 - صحيح. رواه الترمذي (591) وقال: "حديث غريب". قلت: ولا يضر ذلك إن شاء الله تعالى، إذ له شواهد يصح بها كما ذكرته "بالأصل".
Ali reported that the Prophet said: When one of you comes to prayer while the imam is in a particular state, let him do as the imam does. Al-Tirmidhi transmitted it with a weak chain. Al-Tirmidhi (591) called it gharib (unfamiliar). This does not harm it, God willing, since supporting reports strengthen it, as explained in the original work.
Translation notes
The source first cites a weak chain, then gives an editorial assessment that corroborating reports authenticate the hadith. The imam state is left general, matching the Arabic.