Skip to content

Commit 0d3bb58

Browse files
committed
changes from feedback
1 parent 018a15d commit 0d3bb58

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ext/pgsql/pgsql.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6280,15 +6280,15 @@ PHP_FUNCTION(pg_close_stmt)
62806280

62816281
pgsql_result = PQclosePrepared(link->conn, ZSTR_VAL(stmt));
62826282

6283-
if (!pgsql_result) {
6283+
if (PQresultStatus(pgsql_result) != PGRES_COMMAND_OK) {
62846284
RETURN_FALSE;
62856285
} else {
6286-
pgsql_result_handle *pg_result;
6286+
pgsql_result_handle *pg_handle;
62876287
object_init_ex(return_value, pgsql_result_ce);
6288-
pg_result = Z_PGSQL_RESULT_P(return_value);
6289-
pg_result->conn = link->conn;
6290-
pg_result->result = pgsql_result;
6291-
pg_result->row = 0;
6288+
pg_handle = Z_PGSQL_RESULT_P(return_value);
6289+
pg_handle->conn = link->conn;
6290+
pg_handle->result = pgsql_result;
6291+
pg_handle->row = 0;
62926292
}
62936293
}
62946294
#endif

ext/pgsql/tests/pg_close_stmt.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $res = pg_prepare($db, 'test', $query);
1919

2020
$res = pg_execute($db, 'test', $params_null);
2121
$res = pg_close_stmt($db, 'test');
22-
var_dump($res !== null);
22+
var_dump($res !== false);
2323
var_dump(pg_result_status($res) === PGSQL_COMMAND_OK);
2424
pg_prepare($db, 'test', $query);
2525
$res = pg_execute($db, 'test', $params_null);

0 commit comments

Comments
 (0)