You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix #13280: Incorrect queries logged when sorting by custom field having 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.
0 commit comments