From: Felipe Pena Date: Wed, 23 Sep 2009 02:08:19 +0000 (+0000) Subject: - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE canno... X-Git-Tag: php-5.4.0alpha1~191^2~2604 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8bbad1ad60f0f32318c7f3b7631ab3ca8f0f89e0;p=php - 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 9141f5063a..3dad4f69d0 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1665,7 +1665,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)) && (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) { + if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) && + (PG(open_basedir) && *PG(open_basedir)) && (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLPROTO_FILE cannot be activated when open_basedir is set"); RETVAL_FALSE; return 1;