Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reverse search and replace array's in str_replace
The parameters in the search array are appended with an index number. This causes problems when the elements in the array exceed 10 because the first element will find a part in the 10th element (e.g. `content.topics = :topics_1` and `content.topics = :topics_10`). The resulting query will be corrupted because the 0 (in case of the 10th element) will not be replaced and left dangling in the string. This change fixes this by reversing the array's, so the largest string will be looked up and replaced first.
- Loading branch information