projects
/
m6w6
/
ext-pq
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fixes #24
[m6w6/ext-pq]
/
src
/
php_pqconn.c
diff --git
a/src/php_pqconn.c
b/src/php_pqconn.c
index f2a0e0ca8005bf8a5b4fc40664bc11a7b075d742..d0ddfef9317c8036cc666f835dea8197c82bee63 100644
(file)
--- a/
src/php_pqconn.c
+++ b/
src/php_pqconn.c
@@
-1146,11
+1146,12
@@
static PHP_METHOD(pqconn, getResult) {
throw_exce(EX_UNINITIALIZED, "pq\\Connection not initialized");
} else {
PGresult *res = PQgetResult(obj->intern->conn);
throw_exce(EX_UNINITIALIZED, "pq\\Connection not initialized");
} else {
PGresult *res = PQgetResult(obj->intern->conn);
+ php_pq_object_t *res_obj;
- if (
!res
) {
-
RETVAL_NULL(
);
+ if (
res && (res_obj = PQresultInstanceData(res, php_pqconn_event))
) {
+
php_pq_object_to_zval_no_addref(res_obj, return_value
);
} else {
} else {
-
php_pq_object_to_zval_no_addref(PQresultInstanceData(res, php_pqconn_event), return_value
);
+
RETVAL_NULL(
);
}
php_pqconn_notify_listeners(obj);
}
php_pqconn_notify_listeners(obj);