- zlib1g-dev
- libidn11-dev
- libevent-dev
+ - cppcheck
env:
- PHP=7.0 enable_debug=no enable_maintainer_zts=no enable_json=no enable_hash=yes enable_iconv=yes
+ - PHP=7.1 enable_debug=no enable_maintainer_zts=no enable_json=no enable_hash=yes enable_iconv=yes
- PHP=master enable_debug=no enable_maintainer_zts=no enable_json=no enable_hash=yes enable_iconv=yes
- PHP=7.0 enable_debug=yes enable_maintainer_zts=no enable_json=no enable_hash=yes enable_iconv=yes
+ - PHP=7.1 enable_debug=yes enable_maintainer_zts=no enable_json=no enable_hash=yes enable_iconv=yes
- PHP=master enable_debug=yes enable_maintainer_zts=no enable_json=no enable_hash=yes enable_iconv=yes
- PHP=7.0 enable_debug=no enable_maintainer_zts=yes enable_json=no enable_hash=yes enable_iconv=yes
+ - PHP=7.1 enable_debug=no enable_maintainer_zts=yes enable_json=no enable_hash=yes enable_iconv=yes
- PHP=master enable_debug=no enable_maintainer_zts=yes enable_json=no enable_hash=yes enable_iconv=yes
- PHP=7.0 enable_debug=yes enable_maintainer_zts=yes enable_json=no enable_hash=yes enable_iconv=yes
+ - PHP=7.1 enable_debug=yes enable_maintainer_zts=yes enable_json=no enable_hash=yes enable_iconv=yes
- PHP=master enable_debug=yes enable_maintainer_zts=yes enable_json=no enable_hash=yes enable_iconv=yes
- PHP=7.0 enable_debug=no enable_maintainer_zts=no enable_json=yes enable_hash=yes enable_iconv=yes
+ - PHP=7.1 enable_debug=no enable_maintainer_zts=no enable_json=yes enable_hash=yes enable_iconv=yes
- PHP=master enable_debug=no enable_maintainer_zts=no enable_json=yes enable_hash=yes enable_iconv=yes
- PHP=7.0 enable_debug=yes enable_maintainer_zts=no enable_json=yes enable_hash=yes enable_iconv=yes
+ - PHP=7.1 enable_debug=yes enable_maintainer_zts=no enable_json=yes enable_hash=yes enable_iconv=yes
- PHP=master enable_debug=yes enable_maintainer_zts=no enable_json=yes enable_hash=yes enable_iconv=yes
- PHP=7.0 enable_debug=no enable_maintainer_zts=yes enable_json=yes enable_hash=yes enable_iconv=yes
+ - PHP=7.1 enable_debug=no enable_maintainer_zts=yes enable_json=yes enable_hash=yes enable_iconv=yes
- PHP=master enable_debug=no enable_maintainer_zts=yes enable_json=yes enable_hash=yes enable_iconv=yes
- PHP=7.0 enable_debug=yes enable_maintainer_zts=yes enable_json=yes enable_hash=yes enable_iconv=yes
+ - PHP=7.1 enable_debug=yes enable_maintainer_zts=yes enable_json=yes enable_hash=yes enable_iconv=yes
- PHP=master enable_debug=yes enable_maintainer_zts=yes enable_json=yes enable_hash=yes enable_iconv=yes
# once with gcov
- CFLAGS="-O0 -g --coverage" CXXFLAGS="-O0 -g --coverage" PHP=master enable_json=yes enable_hash=yes enable_iconv=yes
script:
- make -f travis/pecl/Makefile test
+ - make -f travis/pecl/Makefile cppcheck
after_failure:
- test -e tests/helper/server.log && cat tests/helper/server.log
- zlib1g-dev
- libidn11-dev
- libevent-dev
+ - cppcheck
env:
<?php
$gen = include "./travis/pecl/gen-matrix.php";
$env = $gen([
- "PHP" => ["7.0", "master"],
+ "PHP" => ["7.0", "7.1", "master"],
"enable_debug",
"enable_maintainer_zts",
"enable_json",
script:
- make -f travis/pecl/Makefile test
+ - make -f travis/pecl/Makefile cppcheck
after_failure:
- test -e tests/helper/server.log && cat tests/helper/server.log
if (timeout_ms <= 0) {
php_http_client_curl_loop(context->client, CURL_SOCKET_TIMEOUT, 0);
- } else if (timeout_ms > 0) {
+ } else {
zval args[1], *ztimeout = &args[0];
ZVAL_LONG(ztimeout, timeout_ms);
info->http.info.request.method&&!strcasecmp(info->http.info.request.method,"CONNECT")?(
info->http.info.request.url?php_http_url_authority_to_string(info->http.info.request.url, &(tmp), NULL):"0"):(
info->http.info.request.url?php_http_url_to_string(info->http.info.request.url, &(tmp), NULL, 0):"/"),
- info->http.version.major||info->http.version.major?info->http.version.major:1,
+ info->http.version.major||info->http.version.minor?info->http.version.major:1,
info->http.version.major||info->http.version.minor?info->http.version.minor:1,
eol);
} else if (info->type == PHP_HTTP_RESPONSE){
- *len = spprintf(str, 0, "HTTP/%u.%u %d%s%s%s", info->http.version.major||info->http.version.major?info->http.version.major:1,
+ *len = spprintf(str, 0, "HTTP/%u.%u %d%s%s%s",
+ info->http.version.major||info->http.version.minor?info->http.version.major:1,
info->http.version.major||info->http.version.minor?info->http.version.minor:1,
info->http.info.response.code?info->http.info.response.code:200,
info->http.info.response.status&&*info->http.info.response.status ? " ":"",
zval *zvalue;
if ((zvalue = zend_hash_str_find(Z_ARRVAL_P(val), ZEND_STRL("value")))) {
- zval tmp;
+ zval tmp = {0};
ZVAL_COPY(&tmp, zvalue);
zval_dtor(val);
/*
* update
*/
- zval equal, tmp, *entry = &tmp;
+ zval equal, tmp, *entry = NULL;
ZVAL_UNDEF(&tmp);
/* recursive */
if (Z_TYPE_P(params_entry) == IS_ARRAY || Z_TYPE_P(params_entry) == IS_OBJECT) {
- ZVAL_DUP(entry, qarray_entry);
- convert_to_array(entry);
- php_http_querystring_update(entry, params_entry, NULL);
+ ZVAL_DUP(&tmp, qarray_entry);
+ convert_to_array(&tmp);
+ php_http_querystring_update(&tmp, params_entry, NULL);
+ entry = &tmp;
} else if ((FAILURE == is_identical_function(&equal, qarray_entry, params_entry)) || Z_TYPE(equal) != IS_TRUE) {
Z_TRY_ADDREF_P(params_entry);
entry = params_entry;
}
- if (entry) {
- if (key.key) {
- zend_hash_update(Z_ARRVAL_P(qarray), key.key, entry);
- } else {
- zend_hash_index_update(Z_ARRVAL_P(qarray), key.h, entry);
- }
+ if (key.key) {
+ zend_hash_update(Z_ARRVAL_P(qarray), key.key, entry ? entry : &tmp);
+ } else {
+ zend_hash_index_update(Z_ARRVAL_P(qarray), key.h, entry ? entry : &tmp);
}
} else {
zval entry, *entry_ptr = &entry;
-Subproject commit 2d06b8b6eba14eb26f4e6b5d0eac19569ef1611c
+Subproject commit a2206d5f2eaf963d37ff568dd17cd6435f00f809