Skip to content

Commit

Permalink
SqliteResult: workaround for PHP bug 79414
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 26, 2020
1 parent 21039ff commit dc3e1cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Dibi/Drivers/Sqlite3Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,12 @@ public function getResultColumns()
$columns = [];
static $types = [SQLITE3_INTEGER => 'int', SQLITE3_FLOAT => 'float', SQLITE3_TEXT => 'text', SQLITE3_BLOB => 'blob', SQLITE3_NULL => 'null'];
for ($i = 0; $i < $count; $i++) {
$type = $this->resultSet->columnType($i); // buggy in PHP 7.4.4 & 7.3.16, bug 79414
$columns[] = [
'name' => $this->resultSet->columnName($i),
'table' => null,
'fullname' => $this->resultSet->columnName($i),
'nativetype' => $types[$this->resultSet->columnType($i)],
'nativetype' => $type ? $types[$type] : null,
];
}
return $columns;
Expand Down

0 comments on commit dc3e1cd

Please sign in to comment.