Encode non-utf-8 symbols in keys
This commit is contained in:
parent
b90e92ee68
commit
2f81a14b95
@ -353,6 +353,13 @@ class MysqlArray implements DbArray
|
||||
return [];
|
||||
}
|
||||
|
||||
if (
|
||||
!empty($params['index'])
|
||||
&& !mb_check_encoding($params['index'], 'UTF-8')
|
||||
) {
|
||||
$params['index'] = mb_convert_encoding($params['index'], 'UTF-8');
|
||||
}
|
||||
|
||||
try {
|
||||
$request = yield $this->db->execute($query, $params);
|
||||
} catch (\Throwable $e) {
|
||||
|
@ -365,6 +365,13 @@ class PostgresArray implements DbArray
|
||||
return [];
|
||||
}
|
||||
|
||||
if (
|
||||
!empty($params['index'])
|
||||
&& !mb_check_encoding($params['index'], 'UTF-8')
|
||||
) {
|
||||
$params['index'] = mb_convert_encoding($params['index'], 'UTF-8');
|
||||
}
|
||||
|
||||
try {
|
||||
$request = yield $this->db->execute($query, $params);
|
||||
} catch (\Throwable $e) {
|
||||
|
Loading…
Reference in New Issue
Block a user