Index: trunk/phase3/includes/HttpFunctions.php |
— | — | @@ -12,9 +12,6 @@ |
13 | 13 | */ |
14 | 14 | class Http { |
15 | 15 | |
16 | | - public static $lastCurlErrno = 0; |
17 | | - public static $lastHttpResponse = 0; |
18 | | - |
19 | 16 | /** |
20 | 17 | * Simple wrapper for Http::request( 'GET' ) |
21 | 18 | * @see Http::request() |
— | — | @@ -85,16 +82,16 @@ |
86 | 83 | ob_end_clean(); |
87 | 84 | |
88 | 85 | # Don't return the text of error messages, return false on error |
89 | | - self::$lastHttpResponse = curl_getinfo( $c, CURLINFO_HTTP_CODE ); |
90 | | - if ( self::$lastHttpResponse != 200 ) { |
91 | | - wfDebug( __METHOD__ . ": HTTP return code " . self::$lastHttpResponse . "\n" ); |
| 86 | + $retcode = curl_getinfo( $c, CURLINFO_HTTP_CODE ); |
| 87 | + if ( $retcode != 200 ) { |
| 88 | + wfDebug( __METHOD__ . ": HTTP return code $retcode\n" ); |
92 | 89 | $text = false; |
93 | 90 | } |
94 | 91 | # Don't return truncated output |
95 | | - self::$lastCurlErrno = curl_errno( $c ); |
96 | | - if ( self::$lastCurlErrno != CURLE_OK ) { |
| 92 | + $errno = curl_errno( $c ); |
| 93 | + if ( $errno != CURLE_OK ) { |
97 | 94 | $errstr = curl_error( $c ); |
98 | | - wfDebug( __METHOD__ . ": CURL error code " . self::$lastCurlErrno . ": $errstr\n" ); |
| 95 | + wfDebug( __METHOD__ . ": CURL error code $errno: $errstr\n" ); |
99 | 96 | $text = false; |
100 | 97 | } |
101 | 98 | curl_close( $c ); |