diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-05-07 17:05:51 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-05-07 17:05:51 +0200 |
commit | 7647f5401caedee0a824f687d792aa352502f82a (patch) | |
tree | 056591f4b6b404a1101bda7148789fe9279c7669 | |
parent | fc1e6b3923483dd0d85e1ee4eb29a410a68401d1 (diff) | |
parent | 72e1da81b6792d4141b4b41f6fc3e92b68aa0f3e (diff) | |
download | php-git-7647f5401caedee0a824f687d792aa352502f82a.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Deprecate CURLPIPE_HTTP1
-rw-r--r-- | ext/curl/multi.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c index bee05838fa..fafcad3263 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -564,8 +564,19 @@ static int _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue, case CURLMOPT_MAX_PIPELINE_LENGTH: case CURLMOPT_MAX_TOTAL_CONNECTIONS: #endif - error = curl_multi_setopt(mh->multi, option, zval_get_long(zvalue)); + { + zend_long lval = zval_get_long(zvalue); + + if (option == CURLMOPT_PIPELINING && (lval & 1)) { +#if LIBCURL_VERSION_NUM >= 0x073e00 /* 7.62.0 */ + php_error_docref(NULL, E_WARNING, "CURLPIPE_HTTP1 is no longer supported"); +#else + php_error_docref(NULL, E_DEPRECATED, "CURLPIPE_HTTP1 is deprecated"); +#endif + } + error = curl_multi_setopt(mh->multi, option, lval); break; + } #if LIBCURL_VERSION_NUM > 0x072D00 /* Available since 7.45.0 */ case CURLMOPT_PUSHFUNCTION: if (mh->handlers->server_push == NULL) { |