This is yet another one from Jack Kornfield’s Buddha’s Little Instruction Book, page 31.
Buddha’s Little Instruction Book is a great title for a book, but it has inadvertently given people the impression that the contents are direct quotes from the Buddha. The book itself makes clear that this is not the case:
For this small handbook, a well-known American Buddhist and psychologist has distilled and adapted an ancient teaching for the needs of contemporary life.
(From the back cover.)