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

Psalms 118:7

I will give thee thanks with uprightness of heart, when I have learnt the judgments of thy righteousness.

Read in other translations