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);
}
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));
ZEND_END_ARG_INFO();
static PHP_METHOD(HttpMessage, count)
{
- if (SUCCESS == zend_parse_parameters_none()) {
+ long count_mode = -1;
+
+ if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &count_mode)) {
long i = 0;
php_http_message_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC);
# define PHP_HTTP_ZEND_LITERAL_CCN , NULL
#endif
+#if PHP_VERSION_ID < 50700
+# define z_is_true zend_is_true
+#else
+# define z_is_true(z) zend_is_true(z TSRMLS_CC)
+#endif
+
#define INIT_PZVAL_ARRAY(zv, ht) \
{ \
INIT_PZVAL((zv)); \