]> granicus.if.org Git - php/commitdiff
Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false)
authorXinchen Hui <laruence@php.net>
Mon, 9 Jul 2012 00:32:40 +0000 (08:32 +0800)
committerXinchen Hui <laruence@php.net>
Mon, 9 Jul 2012 00:32:40 +0000 (08:32 +0800)
this bc break is caused by the fix for #61948

NEWS
ext/curl/interface.c
ext/curl/tests/bug61948.phpt

diff --git a/NEWS b/NEWS
index 782bb62a3396eff104bca12073d5d77478df0c3e..c9f3fc4ac3a9c43a7459e776c2401727ccd4d229 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,10 @@ PHP                                                                        NEWS
   (NEWS will be merged after release by johannes. Formerging changes to the  
   PHP-5.3.15 release branch talk to johannes)
 
+- CURL:
+  . Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
+    (r.hampartsumyan@gmail.com, Laruence)
+
 14 Jun 2012, PHP 5.3.14
 
 - CLI SAPI:
index 270a7dd807085dbdb55849ee406a6736fc395339..94be60fd5d5a78e19ecafdc92b191752ef502b10 100644 (file)
@@ -2167,7 +2167,7 @@ string_copy:
 
                        convert_to_string_ex(zvalue);
 
-                       if (!Z_STRLEN_PP(zvalue) || php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(Z_STRVAL_PP(zvalue), "rb+", CHECKUID_CHECK_MODE_PARAM))) {
+                       if ((Z_STRLEN_PP(zvalue) && php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) || (PG(safe_mode) && !php_checkuid(Z_STRVAL_PP(zvalue), "rb+", CHECKUID_CHECK_MODE_PARAM))) {
                                RETVAL_FALSE;
                                return 1;
                        }
index 23bbda7d5f16a4440a37fd803405f3f4034a2e80..00df07d73e2859e15ea05ba8b46a44be8ccb5bc0 100644 (file)
@@ -16,7 +16,7 @@ open_basedir="/tmp"
   curl_close($ch);
 ?>
 --EXPECTF--
-bool(false)
+bool(true)
 bool(true)
 
 Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowed path(s): (/tmp) in %sbug61948.php on line %d