Sunan Ibn Majah, Volume 1, Book 4, Hadith 744 (DarusSalam)

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.

حَدَّثَنَا مُحَمَّدُ بْنُ يَحْيَى، حَدَّثَنَا عَمْرُو بْنُ عُثْمَانَ، حَدَّثَنَا مُوسَى بْنُ أَعْيَنَ، حَدَّثَنَا مُحَمَّدُ بْنُ إِسْحَاقَ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، وَسُئِلَ، عَنِ الْحِيطَانِ، تُلْقَى فِيهَا الْعَذِرَاتُ فَقَالَ ‏ "‏ إِذَا سُقِيَتْ مِرَارًا فَصَلُّوا فِيهَا ‏" ‏ ‏.‏ يَرْفَعُهُ إِلَى النَّبِيِّ ـ صلى الله عليه وسلم ـ ‏.‏

sunnah.com