Skip to content

Commit c819cf9

Browse files
committed
Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false)
this bc break is caused by the fix for #61948
1 parent b2b018d commit c819cf9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ PHP NEWS
66
(NEWS will be merged after release by johannes. Formerging changes to the
77
PHP-5.3.15 release branch talk to johannes)
88

9+
- CURL:
10+
. Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
11+
([email protected], Laruence)
12+
913
14 Jun 2012, PHP 5.3.14
1014

1115
- CLI SAPI:

ext/curl/interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2167,7 +2167,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
21672167

21682168
convert_to_string_ex(zvalue);
21692169

2170-
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))) {
2170+
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))) {
21712171
RETVAL_FALSE;
21722172
return 1;
21732173
}

ext/curl/tests/bug61948.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ open_basedir="/tmp"
1616
curl_close($ch);
1717
?>
1818
--EXPECTF--
19-
bool(false)
19+
bool(true)
2020
bool(true)
2121

2222
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

0 commit comments

Comments
 (0)