From 8bbad1ad60f0f32318c7f3b7631ab3ca8f0f89e0 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Wed, 23 Sep 2009 02:08:19 +0000 Subject: [PATCH] - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE cannot be set ...") --- ext/curl/interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.50.1