diff options
| author | Felipe Pena <felipe@php.net> | 2009-09-23 02:08:19 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2009-09-23 02:08:19 +0000 |
| commit | 788031f0935ecf26681664ebcd5c81fdfbe7564e (patch) | |
| tree | b12174a92f8f91cf438333db1ec3ba8f82f293d7 /ext/curl/interface.c | |
| parent | 420a3abc6a032ce2936052db5128814791ad3f5f (diff) | |
| download | php-git-788031f0935ecf26681664ebcd5c81fdfbe7564e.tar.gz | |
- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE cannot be set ...")
Diffstat (limited to 'ext/curl/interface.c')
| -rw-r--r-- | ext/curl/interface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 749e618581..51c29dd3a9 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1649,7 +1649,8 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu #endif convert_to_long_ex(zvalue); #if LIBCURL_VERSION_NUM >= 0x71304 - if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) { + if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) && + ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is set"); RETVAL_FALSE; return 1; |
