diff --git a/src/db/src/Connection/Connection.php b/src/db/src/Connection/Connection.php index 9a9dd9911..47c860415 100644 --- a/src/db/src/Connection/Connection.php +++ b/src/db/src/Connection/Connection.php @@ -680,7 +680,7 @@ protected function runQueryCallback(string $query, array $bindings, Closure $cal $this->releaseOrRemove(); // Throw exception - throw new DbException($e->getMessage(), $e->getCode(), $e); + throw new DbException($e->getMessage(), (int)$e->getCode(), $e); } // If an exception occurs when attempting to run a query, we'll format the error @@ -698,7 +698,7 @@ protected function runQueryCallback(string $query, array $bindings, Closure $cal CLog::error('Fail err=%s sql=%s', $e->getMessage(), $rawSql); // Throw exception - throw new DbException($e->getMessage(), $e->getCode(), $e); + throw new DbException($e->getMessage(), (int)$e->getCode(), $e); } $this->pdoType = self::TYPE_DEFAULT;