Skip to content

Commit

Permalink
fixes for PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 19, 2019
1 parent 3b14aaf commit f727c86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Database/Drivers/SqliteDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function normalizeRow($row)
{
foreach ($row as $key => $value) {
unset($row[$key]);
if ($key[0] === '[' || $key[0] === '"') {
if (is_string($key) && ($key[0] === '[' || $key[0] === '"')) {
$key = substr($key, 1, -1);
}
$row[$key] = $value;
Expand Down Expand Up @@ -162,7 +162,7 @@ public function getColumns($table)
'unsigned' => false,
'nullable' => $row['notnull'] == '0',
'default' => $row['dflt_value'],
'autoincrement' => (bool) preg_match($pattern, $meta['sql']),
'autoincrement' => $meta && preg_match($pattern, (string) $meta['sql']),
'primary' => $row['pk'] > 0,
'vendor' => (array) $row,
];
Expand Down

0 comments on commit f727c86

Please sign in to comment.