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 [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!empty($params['index'])
|
||||||
|
&& !mb_check_encoding($params['index'], 'UTF-8')
|
||||||
|
) {
|
||||||
|
$params['index'] = mb_convert_encoding($params['index'], 'UTF-8');
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$request = yield $this->db->execute($query, $params);
|
$request = yield $this->db->execute($query, $params);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
|
@ -365,6 +365,13 @@ class PostgresArray implements DbArray
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!empty($params['index'])
|
||||||
|
&& !mb_check_encoding($params['index'], 'UTF-8')
|
||||||
|
) {
|
||||||
|
$params['index'] = mb_convert_encoding($params['index'], 'UTF-8');
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$request = yield $this->db->execute($query, $params);
|
$request = yield $this->db->execute($query, $params);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user