diff options
author | Xinchen Hui <laruence@php.net> | 2012-07-09 08:32:40 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2012-07-09 08:32:40 +0800 |
commit | c819cf9d6bd43d79b894f1d0f0c6c282893fd9bd (patch) | |
tree | 2fdef1b7c06a1d4f2b9f1faaa0311c4545ef567f /ext/curl | |
parent | b2b018d5f7d0d7a0bc88e6a95fe804c39bd65b9a (diff) | |
download | php-git-c819cf9d6bd43d79b894f1d0f0c6c282893fd9bd.tar.gz |
Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false)
this bc break is caused by the fix for #61948
Diffstat (limited to 'ext/curl')
-rw-r--r-- | ext/curl/interface.c | 2 | ||||
-rw-r--r-- | ext/curl/tests/bug61948.phpt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 270a7dd807..94be60fd5d 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 23bbda7d5f..00df07d73e 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 |