Nope, he did not say this. What is attributed to him by Plato is:
"You could not step twice in the same river."
The rest of this quote is just made up and rephrased by someone else. Source: https://en.wikiquote.org/wiki/Heraclitus
That is, of course, not the actual quote. The real quote is:
"Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety."