Skip to content

Commit

Permalink
Merge pull request #3137 from HeinDR/patch-1
Browse files Browse the repository at this point in the history
Reverse search and replace array's in str_replace
  • Loading branch information
bobdenotter authored Mar 23, 2022
2 parents da785e1 + 01e1532 commit dce0790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Storage/SelectQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ private function getRegularFieldWhereExpression(Filter $filter, string $valueAli
return sprintf("JSON_SEARCH(%s, 'one', %s) != ''", $valueAlias, $parameter[0]);
}, $expressions);

return str_replace($expressions, $newExpressions, $filter->getExpression());
return str_replace(array_reverse($expressions), array_reverse($newExpressions), $filter->getExpression());
}

$originalLeftExpression = 'content.' . $filter->getKey();
Expand Down

0 comments on commit dce0790

Please sign in to comment.