php_http_client_t *client = userdata;
php_http_client_curl_ops_t *ev_ops = NULL;
- if (Z_TYPE_P(value) == IS_OBJECT && instanceof_function(Z_OBJCE_P(value), php_http_client_curl_user_get_class_entry())) {
+ if (value && Z_TYPE_P(value) == IS_OBJECT && instanceof_function(Z_OBJCE_P(value), php_http_client_curl_user_get_class_entry())) {
ev_ops = php_http_client_curl_user_ops_get();
#if PHP_HTTP_HAVE_EVENT
} else if (value && zend_is_true(value)) {
return -1;
}
- if (action == CURL_POLL_REMOVE && ev) {
+ if (action == CURL_POLL_REMOVE) {
php_stream_close(ev->socket);
efree(ev);
curl_multi_assign(curl->handle->multi, sock, NULL);