com php-src: Fixed bug #62499 (curl_setopt($ch, CUR LOPT_COOKIEFILE, "") returns false): NEWS ext/curl/interface.c ext/curl/tests/bug61948 .phpt
| From: | Xinchen Hui | Date: | Mon, 09 Jul 2012 00:32:40 +0000 |
| Subject: | com php-src: Fixed bug #62499 (curl_setopt($ch, CUR LOPT_COOKIEFILE, "") returns false): NEWS ext/curl/interface.c ext/curl/tests/bug61948 .phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-69540@lists.php.net to get a copy of this message | ||
Commit: c819cf9d6bd43d79b894f1d0f0c6c282893fd9bd
Author: Xinchen Hui <laruence@php.net> Mon, 9 Jul 2012 08:32:40 +0800
Parents: b2b018d5f7d0d7a0bc88e6a95fe804c39bd65b9a
Branches: PHP-5.3
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c819cf9d6bd43d79b894f1d0f0c6c282893fd9bd
Log:
Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false)
this bc break is caused by the fix for #61948
Bugs:
https://bugs.php.net/62499
https://bugs.php.net/61948
Changed paths:
M NEWS
M ext/curl/interface.c
M ext/curl/tests/bug61948.phpt
Diff:
diff --git a/NEWS b/NEWS
index 782bb62..c9f3fc4 100644
--- 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:
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 270a7dd..94be60f 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -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;
}
diff --git a/ext/curl/tests/bug61948.phpt b/ext/curl/tests/bug61948.phpt
index 23bbda7..00df07d 100644
--- a/ext/curl/tests/bug61948.phpt
+++ b/ext/curl/tests/bug61948.phpt
@@ -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