Sunan Ibn Majah, Book 4, Hadith 10 (Ibn Majah 744)

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.