fix issue #9 @github: execAsync - gets another result
[m6w6/ext-pq] / src / php_pqconn_event.c
index f509c573867bdf17f742bca499cb045f97897abb..541892f5d11d2abedb715652fa1d3988e5737033 100644 (file)
@@ -86,7 +86,7 @@ static void php_pqconn_event_resultcreate(PGEventResultCreate *event)
                }
 
                /* async callback */
-               if (data->obj->intern->onevent.fci.size > 0) {
+               if (php_pq_callback_is_enabled(&data->obj->intern->onevent)) {
                        zval *res = NULL;
 
                        php_pq_object_to_zval(obj, &res TSRMLS_CC);