Skip to content

Commit

Permalink
- Merge: Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warnin…
Browse files Browse the repository at this point in the history
…g “CURLPROTO_FILE cannot be set …)
  • Loading branch information
pierrejoye committed Oct 10, 2009
1 parent fc0f16c commit 0304269
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/curl/interface.c
Expand Up @@ -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;
Expand Down

0 comments on commit 0304269

Please sign in to comment.