Follow up r67663. Now with 100% less sugar, er.. @s!
authorPlatonides <platonides@users.mediawiki.org>
Wed, 29 Dec 2010 16:15:23 +0000 (16:15 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Wed, 29 Dec 2010 16:15:23 +0000 (16:15 +0000)
includes/HttpFunctions.php

index 042ee86..2d3d8c3 100644 (file)
@@ -867,12 +867,14 @@ class CurlHttpRequest extends MWHttpRequest {
                }
 
                if ( $this->followRedirects && $this->canFollowRedirects() ) {
-                       if ( ! @curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, true ) ) {
+                       wfSuppressWarnings();
+                       if ( ! curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, true ) ) {
                                wfDebug( __METHOD__ . ": Couldn't set CURLOPT_FOLLOWLOCATION. " .
                                        "Probably safe_mode or open_basedir is set.\n" );
                                // Continue the processing. If it were in curl_setopt_array,
                                // processing would have halted on its entry
                        }
+                       wfRestoreWarnings();
                }
 
                if ( false === curl_exec( $curlHandle ) ) {