]> granicus.if.org Git - php/commitdiff
- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE canno...
authorFelipe Pena <felipe@php.net>
Wed, 23 Sep 2009 02:08:19 +0000 (02:08 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 23 Sep 2009 02:08:19 +0000 (02:08 +0000)
ext/curl/interface.c

index 9141f5063a8cc74db4499a7ba8ca6481e6dc0e3a..3dad4f69d0ec844370055110df84ee1365ebbdd4 100644 (file)
@@ -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;