From 149737fb278444a4fc21fd9d44d34d0c18512b8e Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 15 Mar 2011 12:24:05 +0000 Subject: [PATCH] Kill the oldtimeout stuff, with minimum PHP being 5.2.3 --- includes/HttpFunctions.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index ecf22773ef..cd919b4528 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -732,12 +732,7 @@ class PhpHttpRequest extends MWHttpRequest { $options['content'] = $this->postData; } - $oldTimeout = false; - if ( version_compare( '5.2.1', phpversion(), '>' ) ) { - $oldTimeout = ini_set( 'default_socket_timeout', $this->timeout ); - } else { - $options['timeout'] = $this->timeout; - } + $options['timeout'] = $this->timeout; $context = stream_context_create( array( 'http' => $options ) ); @@ -778,10 +773,6 @@ class PhpHttpRequest extends MWHttpRequest { } } while ( true ); - if ( $oldTimeout !== false ) { - ini_set( 'default_socket_timeout', $oldTimeout ); - } - $this->setStatus(); if ( $fh === false ) { -- 2.20.1