From c51e32860a404bc16e844ad1c3685dc8cdee14a9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 2 Apr 2013 16:33:54 +0200 Subject: [PATCH 1/3] NEW for #64565 --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index ad4852d4b51..7f29c31b797 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ PHP NEWS - Core: . Fixed bug #64433 (follow_location parameter of context is ignored for most response codes). (Sergey Akbarov) + . Fixed bug #64565 (copy doesn't report failure on partial copy). (Remi) ?? ??? 2013, PHP 5.4.14 - Core: From d7f709a032a40cb475042b43db07a4698a2488b7 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 3 Apr 2013 10:09:51 +0800 Subject: [PATCH 2/3] Add CURL_WRAPPERS_ENABLE constant see http://news.php.net/php.internals/66871 --- NEWS | 3 +++ ext/curl/interface.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index ad4852d4b51..f250afa093f 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ PHP NEWS . Fixed bug #64433 (follow_location parameter of context is ignored for most response codes). (Sergey Akbarov) +- CURL + . Add CURL_WRAPPERS_ENABLE constant. (Laruence) + ?? ??? 2013, PHP 5.4.14 - Core: . Fixed bug #64529 (Ran out of opcode space). (Dmitry) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 531f15ba15f..ee205a707bb 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -914,6 +914,7 @@ PHP_MINIT_FUNCTION(curl) } #ifdef PHP_CURL_URL_WRAPPERS + REGISTER_LONG_CONSTANT("CURL_WRAPPERS_ENABLE", 1, CONST_CS | CONST_PERSISTENT); # if HAVE_CURL_VERSION_INFO { curl_version_info_data *info = curl_version_info(CURLVERSION_NOW); @@ -940,6 +941,8 @@ PHP_MINIT_FUNCTION(curl) php_unregister_url_stream_wrapper("ldap"); php_register_url_stream_wrapper("ldap", &php_curl_wrapper TSRMLS_CC); # endif +#else + REGISTER_LONG_CONSTANT("CURL_WRAPPERS_ENABLE", 0, CONST_CS | CONST_PERSISTENT); #endif return SUCCESS; From 78a9489f6a7326dd0ce0c2baaf37c94a0a85f931 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 3 Apr 2013 10:12:49 +0800 Subject: [PATCH 3/3] Use new constant replace ugly trick --- ext/standard/tests/streams/bug64433.phpt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ext/standard/tests/streams/bug64433.phpt b/ext/standard/tests/streams/bug64433.phpt index a1bf2196af9..87c1c7cfb48 100644 --- a/ext/standard/tests/streams/bug64433.phpt +++ b/ext/standard/tests/streams/bug64433.phpt @@ -9,10 +9,7 @@ if(!$res) { die("skip could not open cli server script"); } -ob_start(); -phpinfo(); -$curlwrappers = preg_match("/with-curlwrappers/", ob_get_clean()); -if ($curlwrappers) { +if (CURL_WRAPPERS_ENABLE) { die("skip curl wrappers used"); } ?>