Skip to content

Commit

Permalink
Fixed exception getting error code from Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
thommcgrath committed Aug 9, 2024
1 parent f866ef9 commit d34736d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Website/framework/classes/BeaconPostgreSQLDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function Query(string $sql, ...$params) {
return new BeaconPostgreSQLRecordSet($result);
} else {
$this->ResetTransactions();
$errorCode = pg_result_error_field($result, PGSQL_DIAG_SQLSTATE);
$errorCode = intval(pg_result_error_field($result, PGSQL_DIAG_SQLSTATE));
$errorMessage = pg_result_error_field($result, PGSQL_DIAG_MESSAGE_PRIMARY);
$errorDetail = pg_result_error_field($result, PGSQL_DIAG_MESSAGE_DETAIL);
if (is_null($errorDetail) === false) {
Expand Down

0 comments on commit d34736d

Please sign in to comment.