Sayyiduna Abu Huraira (may Allah be pleased with him) reports that the Messenger of Allah (peace and blessings be upon him) said: "When any of you sees someone afflicted with a trial, he should say: '«الْحَمْدُلِلّٰهِالَّذِيفَضَّلَنِيعَلَيْكَوَعَلَىٰكَثِيرٍمِنْعِبَادِهِتَفْضِيلًا»' 'All praise is due to Allah who has favored me over you and over much of His creation.'"
Hadith Referenceمعجم صغير للطبراني / كتاب الأدعية و الأذكار / 935
Hadith Gradingمحدثین:إسناده حسن
Hadith Takhrij«إسناده حسن ، أخرجه الطبراني فى «الأوسط» برقم: 4724، والطبراني فى «الصغير» برقم: 675 قال الهيثمي: وإسناده حسن، مجمع الزوائد ومنبع الفوائد: (138/10)»
´Abu Hurairah narrated that:` The Messenger of Allah (ﷺ) said: “Whoever sees an afflicted person then says: ‘All praise is due to Allah who saved me from that which He has afflicted you with, and blessed me greatly over many of those whom He has created, (Al-ḥamdulillāhi alladhī `āfānī mimmabtalāka bihī wa faḍḍalanī `alā kathīrin mimman khalaqa tafḍīla)’ he shall not be struck by that affliction.”
Shaykh Dr. Abdur Rahman Freywai
Commentary: Note: (In the chain of narration, Abdullah bin Umar al-Umari is a weak narrator, but on the basis of corroborating evidences, this hadith is sahih li-ghayrihi (authentic due to supporting narrations). See: al-Silsilah al-Sahihah: 206, 2737, and refer to al-Albani 228)
Source: Sunan al-Tirmidhi – Majlis ‘Ilmi Dar al-Da‘wah, New Delhi Edition, Page: 3432