This needs to use `mb_substr()`, as we checked UTF-8 validity before to use
`UNHEX()` with binary strings. Previously UTF-8 sequences might've been cut
short and the resulting invalid sequence cannot be JSON encoded, as JSON
requires strings to be valid UTF-8.
see https://www.woltlab.com/community/thread/298853-schwer-reproduzierbar-fehlermeldungen-beim-importieren-von-sprachdateien/
);
}
- return "'" . \substr($parameter, 0, 100) . "'";
+ return "'" . \mb_substr($parameter, 0, 100) . "'";
},
$this->query
),