Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #13280: Incorrect queries logged when sorting by custom field hav…
…ing accented chars The offsets returned by preg_match are byte-based, which causes issues with UTF-8 characters as the subsequent calls to utf8_substr operate on the wrong part of the string; this results in logging of invalid SQL queries when $g_show_queries_list = ON. This commit fixes the problem by realigning the offsets prior to performing the query parameter substitution. It also simplifies the code by removing parenthesis in the regexp pattern, which is not necessary since we are only matching a single element, this way there is no need to deal with a multi-dimentional array.
- Loading branch information