Here is noted the fifth lesson, by which severity is preferred to softness, as for example harsh rebuke to flattery. On account of which he says: "It is better to be rebuked by a wise man than to be deceived by the flattery of fools." Proverbs 27: "Open rebuke is better than hidden love," because rebuke directs, but flattery deceives. Proverbs 16: "A wicked man entices his friend and leads him by a way that is not good." And Isaiah 3: "O my people, those who call you blessed, they themselves deceive you."
Source: Commentary on Ecclesiastes, Chapter 7