Merge "Stop using SiteConfiguration::isLocalVHost()"
[lhc/web/wiklou.git] / includes / HttpFunctions.php
index a31b157..e1cd5c7 100644 (file)
@@ -95,7 +95,7 @@ class Http {
         * @param string $url
         * @param array $options
         * @param string $caller The method making this request, for profiling
-        * @return string
+        * @return string|bool false on error
         */
        public static function get( $url, $options = array(), $caller = __METHOD__ ) {
                $args = func_get_args();
@@ -118,7 +118,7 @@ class Http {
         * @param string $url
         * @param array $options
         * @param string $caller The method making this request, for profiling
-        * @return string
+        * @return string|bool false on error
         */
        public static function post( $url, $options = array(), $caller = __METHOD__ ) {
                return Http::request( 'POST', $url, $options, $caller );
@@ -816,7 +816,7 @@ class CurlHttpRequest extends MWHttpRequest {
                        MediaWiki\suppressWarnings();
                        if ( !curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, true ) ) {
                                wfDebug( __METHOD__ . ": Couldn't set CURLOPT_FOLLOWLOCATION. " .
-                                       "Probably safe_mode or open_basedir is set.\n" );
+                                       "Probably open_basedir is set.\n" );
                                // Continue the processing. If it were in curl_setopt_array,
                                // processing would have halted on its entry
                        }
@@ -861,8 +861,8 @@ class CurlHttpRequest extends MWHttpRequest {
                }
 
                if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
-                       if ( strval( ini_get( 'open_basedir' ) ) !== '' || wfIniGetBool( 'safe_mode' ) ) {
-                               wfDebug( "Cannot follow redirects in safe mode\n" );
+                       if ( strval( ini_get( 'open_basedir' ) ) !== '' ) {
+                               wfDebug( "Cannot follow redirects when open_basedir is set\n" );
                                return false;
                        }
                }