Skip to content

Commit 7f55d86

Browse files
committed
fix DibiAdapter v3 compatibility
1 parent d35d328 commit 7f55d86

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Bridges/Dibi/DibiAdapter.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ public function query(string $sql): array
3636

3737
public function exec(string $sql): int
3838
{
39-
return $this->conn->nativeQuery($sql)->getRowCount();
39+
$result = $this->conn->nativeQuery($sql);
40+
41+
if (is_int($result)) {
42+
return $result;
43+
}
44+
45+
return $result->getRowCount();
4046
}
4147

4248

@@ -54,7 +60,7 @@ public function escapeInt(int $value): string
5460

5561
public function escapeBool(bool $value): string
5662
{
57-
return $this->conn->getDriver()->escapeBool($value);
63+
return (string) $this->conn->getDriver()->escapeBool($value);
5864
}
5965

6066

0 commit comments

Comments
 (0)