From 03042693bc62e938cfa44750bf7c17771d0ccd5b Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 10 Oct 2009 09:17:01 +0000 Subject: [PATCH] =?utf8?q?-=20Merge:=20Fixed=20bug=20#49531=20(CURLOPT=5FI?= =?utf8?q?NFILESIZE=20sometimes=20causes=20warning=20=E2=80=9CCURLPROTO=5F?= =?utf8?q?FILE=20cannot=20be=20set=20=E2=80=A6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- 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 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; -- 2.50.1