Sunan Ibn Majah, Book 4, Hadith 10 (In-Book) ⓘ
It was narrated that Ibn 'Umar was asked about gardens in which excrement was thrown.: He said: "If it has been watered several times, then perform prayer there," and he attributed that to the Prophet.
حَدَّثَنَا مُحَمَّدُ بْنُ يَحْيَى، حَدَّثَنَا عَمْرُو بْنُ عُثْمَانَ، حَدَّثَنَا مُوسَى بْنُ أَعْيَنَ، حَدَّثَنَا مُحَمَّدُ بْنُ إِسْحَاقَ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، وَسُئِلَ، عَنِ الْحِيطَانِ، تُلْقَى فِيهَا الْعَذِرَاتُ فَقَالَ " إِذَا سُقِيَتْ مِرَارًا فَصَلُّوا فِيهَا " . يَرْفَعُهُ إِلَى النَّبِيِّ ـ صلى الله عليه وسلم ـ .
also referenced under: Hadith 744 (Reference) & Volume 1, Book 4, Hadith 744 (DarusSalam)