Old Testament readings use the Septuagint , the Scripture the apostles quoted. Masoretic numbering shown for reference.Learn why
KJV

Psalms 119:7

I will praise thee with uprightness of heart, when I shall have learned thy righteous judgments.

Read in other translations