mirror of
https://github.com/dg/dibi.git
synced 2025-08-07 14:46:50 +02:00
Sqlite3Driver: for SQLite 3 is not needed to strip [] from column names
This commit is contained in:
@@ -401,15 +401,12 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
|
||||
{
|
||||
$row = $this->resultSet->fetchArray($assoc ? SQLITE3_ASSOC : SQLITE3_NUM);
|
||||
$charset = $this->charset === null ? null : $this->charset . '//TRANSLIT';
|
||||
if ($row && ($assoc || $charset)) {
|
||||
$tmp = [];
|
||||
if ($row && $charset) {
|
||||
foreach ($row as $k => $v) {
|
||||
if ($charset !== null && is_string($v)) {
|
||||
$v = iconv($this->dbcharset, $charset, $v);
|
||||
if (is_string($v)) {
|
||||
$row[$k] = iconv($this->dbcharset, $charset, $v);
|
||||
}
|
||||
$tmp[str_replace(['[', ']'], '', $k)] = $v;
|
||||
}
|
||||
return $tmp;
|
||||
}
|
||||
return $row;
|
||||
}
|
||||
|
Reference in New Issue
Block a user