Skip to content

Commit

Permalink
fix type error on throw db exception
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Sep 16, 2020
1 parent aa2294b commit ee58145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/db/src/Connection/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -698,7 +698,7 @@ protected function runQueryCallback(string $query, array $bindings, Closure $cal
CLog::error('Fail err=<error>%s</error> 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;
Expand Down

0 comments on commit ee58145

Please sign in to comment.