Sunan Ibn Majah 1702
Fasting
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَمُحَمَّدُ بْنُ الصَّبَّاحِ، قَالاَ حَدَّثَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنْ عَمْرِو بْنِ دِينَارٍ، عَنْ يَحْيَى بْنِ جَعْدَةَ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو الْقَارِيِّ، قَالَ: سَمِعْتُ أَبَا هُرَيْرَةَ، يَقُولُ لاَ وَرَبِّ الْكَعْبَةِ مَا أَنَا قُلْتُ: " مَنْ أَصْبَحَ وَهُوَ جُنُبٌ فَلْيُفْطِرْ " . مُحَمَّدٌ ـ صلى الله عليه وسلم ـ قَالَهُ .
It was narrated that ‘Abdullah bin ‘Amr Al-Qari said:“I heard Abu hurairah say: ‘No, by the Lord of the Ka’bah! I did not say: “Whoever wakes up in a state of sexual impurity (and wants to fast) then he must not fast.” Muhammad (ﷺ) said it.’”
Grading: Al-Albani: Sahih · Muhammad Fouad Abd al-Baqi: Sahih · Shuaib Al Arnaut: Sahih · Zubair Ali Zai: Sahih
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.