Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Fixes #35 #36

Merged
merged 1 commit into from
Sep 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions swoole_postgresql_coro.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1087,11 +1087,11 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
RETURN_FALSE;
}

if ((pg_result = (pg_object *) zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
if ((pgsql_result = (PGresult *) zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
RETURN_FALSE;
}

pgsql_result = pg_result->result;
pg_result = php_swoole_postgresql_coro_get_object(ZEND_THIS);

if (use_row) {
if (row < 0 || row >= PQntuples(pgsql_result)) {
Expand Down