X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_client.c;h=489177bf7a23fbcfdd347c875859ff79ba9b2afa;hp=6dced6632a3817bdacb9936ad70996ef268b9149;hb=a9934a75410f25ba6c27cd7c93b4211b15c70b5e;hpb=87db9817d428282792c8146d9c2ae9748ebf6f1e diff --git a/php_http_client.c b/php_http_client.c index 6dced66..489177b 100644 --- a/php_http_client.c +++ b/php_http_client.c @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2013, Michael Wallner | + | Copyright (c) 2004-2014, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -390,7 +390,7 @@ static STATUS handle_response(void *arg, php_http_client_t *client, php_http_cli zval *info, *zresponse, *zrequest; HashTable *info_ht; - if (i_zend_is_true(zend_read_property(php_http_client_class_entry, &zclient, ZEND_STRL("recordHistory"), 0 TSRMLS_CC))) { + if (z_is_true(zend_read_property(php_http_client_class_entry, &zclient, ZEND_STRL("recordHistory"), 0 TSRMLS_CC))) { handle_history(&zclient, *request, *response TSRMLS_CC); } @@ -720,7 +720,9 @@ ZEND_BEGIN_ARG_INFO_EX(ai_HttpClient_count, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(HttpClient, count) { - if (SUCCESS == zend_parse_parameters_none()) { + long count_mode = -1; + + if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &count_mode)) { php_http_client_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); RETVAL_LONG(zend_llist_count(&obj->client->requests));