While we were sitting with the Prophet ﷺ, a man came to him and said, "Messenger of Allah, I am ruined!"The Prophet asked, "What is the matter with you?"The man replied, "I had relations with my wife while I was fasting."The Messenger of Allah ﷺ asked, "Can you find a slave to free?"He said, "No."The Prophet asked, "Are you able to fast two consecutive months?"He said, "No."The Prophet asked, "Can you find the means to feed sixty poor people?"He said, "No."The Prophet ﷺ then waited. While we were in that state, a large basket of dates was brought to the Prophet ﷺ. He asked, "Where is the questioner?"The man said, "Here I am."The Prophet said, "Take this and give it in charity."The man said, "To someone poorer than me, Messenger of Allah? By Allah, there is no household between its two lava plains," meaning the two stony tracts of Madinah, "poorer than my household."The Prophet ﷺ laughed until his molars showed, then said, "Feed it to your family."
بينا نحن جلوس عند النبي ﷺ إذ جاءه رجل، فقال: يا رسول الله، هلكت! قال: مالك؟ قال: وقعت على امرأتي وأنا صائم. فقال: رسول الله ﷺ: هل تجد رقبة تعتقها؟ قال: لا. قال: فهل تستطيع أن تصوم شهرين متتابعين؟ قال: لا. قال: فهل تجد إطعام ستين مسكينا؟ قال: لا. قال: فمكث النبي ﷺ، فبينا نحن على ذلك أتي النبي ﷺ بعرق فيها تمر- والعرق: المكتل- قال: أين السائل؟ فقال: أنا. قال: خذ هذا فتصدق به. فقال الرجل: على أفقر مني يا رسول الله؟ فوالله ما بين لابتيها-يريد الحرتين- أهل بيت أفقر من أهل بيتي. فضحك النبي ﷺ حتى بدت أنيابه، ثم قال: أطعمه أهلك.
Bukhari narrated it in "Fasting" (1936), and Muslim in "Fasting" (1111), both through Zuhri, who said, "Humayd bin Abdul-Rahman informed me that Abu Hurairah said" (and he mentioned it). The wording given is that of Bukhari.