Merge branch 'v2.6.x'
authorMichael Wallner <mike@php.net>
Wed, 14 Sep 2016 06:07:59 +0000 (08:07 +0200)
committerMichael Wallner <mike@php.net>
Wed, 14 Sep 2016 06:08:49 +0000 (08:08 +0200)
1  2 
scripts/gen_curlinfo.php
src/php_http_client_curl.c

Simple merge
index cf65353aed172ddba92a0ee2b0748d8243de29df,b7c6b05389012f74bc667b2d2a38f23feee855b9..69b6ca7c79d61fd369af32e324b94848492f62e5
@@@ -470,10 -447,14 +470,16 @@@ static ZEND_RESULT_CODE php_http_curle_
  #endif
  #if PHP_HTTP_CURL_VERSION(7,21,0)
        if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_LOCAL_PORT, &l)) {
 -              add_assoc_long_ex(&array, "local_port", sizeof("local_port"), l);
 +              ZVAL_LONG(&tmp, l);
 +              zend_hash_str_update(info, "local_port", lenof("local_port"), &tmp);
        }
  #endif
 -              add_assoc_long_ex(&array, "http_version", sizeof("http_version"), l);
+ #if PHP_HTTP_CURL_VERSION(7,50,0)
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_HTTP_VERSION, &l)) {
++              ZVAL_LONG(&tmp, l);
++              zend_hash_str_update(info, "http_version", lenof("http_version"), &tmp);
+       }
+ #endif
  
        /* END::CURLINFO */