]> granicus.if.org Git - php/commitdiff
- Merge: Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning “CURLPROTO_FIL...
authorPierre Joye <pajoye@php.net>
Sat, 10 Oct 2009 09:17:01 +0000 (09:17 +0000)
committerPierre Joye <pajoye@php.net>
Sat, 10 Oct 2009 09:17:01 +0000 (09:17 +0000)
ext/curl/interface.c

index 641f0f3b9fa3899698faf5eb42502e166c43fb34..7a589ca201d1690c0a5d0ceb4adf735dc858a15e 100644 (file)
@@ -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;