Skip to content

Commit 07c3666

Browse files
committed
Fix Sqlite primary key column detection on PHP 8.1
1 parent a35dcdb commit 07c3666

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
@@ -64,7 +64,7 @@ public function getPrimaryKey($tableName)
6464
$columns = $stmt->fetchAll(\PDO::FETCH_ASSOC);
6565

6666
foreach ($columns as $column) {
67-
if ($column['pk'] !== '0') {
67+
if ($column['pk'] !== '0' && $column['pk'] !== 0) {
6868
$primaryKey []= $column['name'];
6969
}
7070
}

0 commit comments

Comments
 (0)