]> granicus.if.org Git - php/commitdiff
Fixed condition
authorIlia Alshanetsky <iliaa@php.net>
Thu, 10 Aug 2006 15:02:41 +0000 (15:02 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 10 Aug 2006 15:02:41 +0000 (15:02 +0000)
ext/curl/streams.c

index a1758787da5a948c30e395295fd7e1f9248bcf62..f4aeded3e9b9078428b65993cfad0d009a11cfd1 100644 (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);
                }