صحيح ابن خزيمه
Sahih Ibn Khuzaymah
جُمَّاعُ أَبْوَابِ فُضُولِ التَطْهِيرِ وَالِاسْتِحْبَابِ مِنْ غَيْرِ إِيجَابٍ
Chapters on Recommended Purifications
(161) بَابُ ذِكْرِ الدَّلِيلِ عَلَى أَنَّ كَرَاهِيَةَ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ لِذِكْرِ اللَّهِ عَلَى غَيْرِ طُهْرٍ كَانَتْ
Chapter 161: Evidence that the Prophet disliked mentioning Allah without purity
Hadith Number: Q207
إذ الذكر على طهارة افضل، لا انه غير جائز ان يذكر الله على غير طهر، إذ النبي صلى الله عليه وسلم قد كان يذكر الله على كل احيانه.
It was because mentioning Allah Almighty with purity is more virtuous, not because mentioning Allah Almighty without purity is not permissible. Because the Prophet Muhammad (peace be upon him) used to mention Allah Almighty at all times.
تخریج الحدیث:
Hadith Number: 207
نا محمد بن العلاء بن كريب الهمداني ، وعلي بن مسلم ، قالا: حدثنا ابن ابي زائدة ، عن خالد بن سلمة ، عن البهي ، عن عروة ، عن عائشة ، قالت:" كان رسول الله صلى الله عليه وسلم يذكر الله على كل احيانه" . هذا لفظ حديث ابي كريب
Lady Aisha (may Allah be pleased with her) narrates that the Messenger of Allah (peace be upon him) used to remember Allah Almighty at all times. These are the words of Abu Kurayb’s narration.
تخریج الحدیث: