r84012 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84011‎ | r84012 | r84013 >
Date:12:24, 15 March 2011
Author:reedy
Status:ok
Tags:
Comment:
Kill the oldtimeout stuff, with minimum PHP being 5.2.3
Modified paths:
  • /trunk/phase3/includes/HttpFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HttpFunctions.php
@@ -732,12 +732,7 @@
733733 $options['content'] = $this->postData;
734734 }
735735
736 - $oldTimeout = false;
737 - if ( version_compare( '5.2.1', phpversion(), '>' ) ) {
738 - $oldTimeout = ini_set( 'default_socket_timeout', $this->timeout );
739 - } else {
740 - $options['timeout'] = $this->timeout;
741 - }
 736+ $options['timeout'] = $this->timeout;
742737
743738 $context = stream_context_create( array( 'http' => $options ) );
744739
@@ -778,10 +773,6 @@
779774 }
780775 } while ( true );
781776
782 - if ( $oldTimeout !== false ) {
783 - ini_set( 'default_socket_timeout', $oldTimeout );
784 - }
785 -
786777 $this->setStatus();
787778
788779 if ( $fh === false ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83879Require at least PHP 5.2.3. There's not much point increasing the minimum to ...tstarling10:42, 14 March 2011

Status & tagging log