When a person has wandered away from the Lord, and been enticed by false lovers, you can pray a hedge of thorns be placed before them to block them on their way. The Lord will hear and answer this prayer, and put barriers in their way so they cannot continue on their path toward evil. They will come to their senses and return to God and righteousness. This is exactly what happened with Gomer, Hosea’s wife.
(Gomer) was unfaithful. She was disgraceful and said, "I'll run after my lovers. Everything comes from them -- my food and drink, my linen and wool, my olive oil and wine." I, the LORD, will build a fence (hedge/wall) of thorns to block her path. She will run after her lovers, but not catch them; she will search, but not find them. Then she will say, "I'll return to my first husband. Life was better then." (Hosea 2:5-7)