diff --git a/Website/framework/classes/BeaconPostgreSQLDatabase.php b/Website/framework/classes/BeaconPostgreSQLDatabase.php index cf851e79e..b0cf90c0d 100644 --- a/Website/framework/classes/BeaconPostgreSQLDatabase.php +++ b/Website/framework/classes/BeaconPostgreSQLDatabase.php @@ -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) {