X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=src%2Fphp_pqconn_event.c;h=541892f5d11d2abedb715652fa1d3988e5737033;hb=a06db6d217fc8ba0fd9b8273a9e595477d59afcc;hp=2c4461a2536741257bd90108ac1a510c976cb631;hpb=9f5cecf26bd70a92ed013f31afec59e272623ac1;p=m6w6%2Fext-pq diff --git a/src/php_pqconn_event.c b/src/php_pqconn_event.c index 2c4461a..541892f 100644 --- a/src/php_pqconn_event.c +++ b/src/php_pqconn_event.c @@ -69,7 +69,7 @@ static void php_pqconn_event_resultcreate(PGEventResultCreate *event) HashTable *evhs; TSRMLS_DF(data); - php_pqres_init_instance_data(event->result, &obj TSRMLS_CC); + php_pqres_init_instance_data(event->result, data->obj, &obj TSRMLS_CC); /* event listener */ if (SUCCESS == zend_hash_find(&data->obj->intern->eventhandlers, ZEND_STRS("result"), (void *) &evhs)) { @@ -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);