From 337049c4af1de48b24f4503c22479df07dfec905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Tvrd=C3=ADk?= Date: Thu, 18 Jan 2024 23:10:21 +0100 Subject: [PATCH] fix DibiAdapter v3 compatibility --- src/Bridges/Dibi/DibiAdapter.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Bridges/Dibi/DibiAdapter.php b/src/Bridges/Dibi/DibiAdapter.php index 953c5a0..56d7daa 100644 --- a/src/Bridges/Dibi/DibiAdapter.php +++ b/src/Bridges/Dibi/DibiAdapter.php @@ -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(); }