Skip to content

Commit b7b8b1a

Browse files
committed
Fix Sqlite primary key column detection on PHP 8.1
1 parent 888f64f commit b7b8b1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Codeception/Lib/Driver/Sqlite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function getPrimaryKey(string $tableName): array
7070
$columns = $stmt->fetchAll(PDO::FETCH_ASSOC);
7171

7272
foreach ($columns as $column) {
73-
if ($column['pk'] !== '0') {
73+
if ($column['pk'] !== '0' && $column['pk'] !== 0) {
7474
$primaryKey []= $column['name'];
7575
}
7676
}

0 commit comments

Comments
 (0)