1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00

Fixed condition

This commit is contained in:
Ilia Alshanetsky
2006-08-10 15:02:41 +00:00
parent a4d2f04307
commit 2ce982b433

View File

@@ -350,17 +350,17 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
}
if (mr > 1) {
if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 0);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
}
curl_easy_setopt(curlstream->curl, CURLOPT_MAXREDIRS, mr);
}
} else {
if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 0);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
}
curl_easy_setopt(curlstream->curl, CURLOPT_MAXREDIRS, 20L);
}