From: Pierre Joye Date: Sat, 10 Oct 2009 09:17:01 +0000 (+0000) Subject: - Merge: Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning “CURLPROTO_FIL... X-Git-Tag: php-5.3.1RC2~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03042693bc62e938cfa44750bf7c17771d0ccd5b;p=php - Merge: Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning “CURLPROTO_FILE cannot be set …) --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 641f0f3b9f..7a589ca201 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1563,7 +1563,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;