Skip to content

Commit

Permalink
fix DibiAdapter v3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JanTvrdik committed Jan 18, 2024
1 parent d35d328 commit 7f55d86
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Bridges/Dibi/DibiAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ public function query(string $sql): array

public function exec(string $sql): int
{
return $this->conn->nativeQuery($sql)->getRowCount();
$result = $this->conn->nativeQuery($sql);

if (is_int($result)) {
return $result;
}

return $result->getRowCount();
}


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

public function escapeBool(bool $value): string
{
return $this->conn->getDriver()->escapeBool($value);
return (string) $this->conn->getDriver()->escapeBool($value);
}


Expand Down

0 comments on commit 7f55d86

Please sign in to comment.