add connection to pg_last_error call

This commit is contained in:
Matthew Bucci
2023-11-07 15:32:19 -08:00
parent dad1f0d264
commit ed00779cf5

View File

@ -174,7 +174,7 @@ function pg4wp_init()
$result = pg_query($connection, $sql);
if ((PG4WP_DEBUG || PG4WP_LOG_ERRORS) && $result === false) {
$error = pg_last_error();
$error = pg_last_error($connection);
error_log("[" . microtime(true) . "] Error creating MySQL-compatible field function: $error\n", 3, PG4WP_LOG . 'pg4wp_errors.log');
}
}