r49700 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49699‎ | r49700 | r49701 >
Date:16:02, 21 April 2009
Author:demon
Status:ok (Comments)
Tags:
Comment:
Remove last of ini_set() for allow_url_fopen. This hasn't worked since PHP 4.3.4, when it became a PHP_INI_SYSTEM setting.
Modified paths:
  • /trunk/phase3/includes/ExternalStoreHttp.php (modified) (history)
  • /trunk/phase3/includes/WebStart.php (modified) (history)
  • /trunk/phase3/includes/templates/PHP4.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WebStart.php
@@ -46,7 +46,6 @@
4747 $wgRUstart = array();
4848 }
4949 unset( $IP );
50 -@ini_set( 'allow_url_fopen', 0 ); # For security
5150
5251 # Valid web server entry point, enable includes.
5352 # Please don't move this line to includes/Defines.php. This line essentially
Index: trunk/phase3/includes/ExternalStoreHttp.php
@@ -7,9 +7,7 @@
88 class ExternalStoreHttp {
99 /* Fetch data from given URL */
1010 function fetchFromURL($url) {
11 - ini_set( "allow_url_fopen", true );
1211 $ret = file_get_contents( $url );
13 - ini_set( "allow_url_fopen", false );
1412 return $ret;
1513 }
1614
Index: trunk/phase3/includes/templates/PHP4.php
@@ -70,8 +70,7 @@
7171 if( function_exists( 'file_get_contents' ) ) {
7272 $errorLevel = error_reporting();
7373 error_reporting( $errorLevel & !E_WARNING );
74 -
75 - ini_set( 'allow_url_fopen', '1' );
 74+
7675 $s = file_get_contents( $testUrl );
7776
7877 error_reporting( $errorLevel );

Follow-up revisions

RevisionCommit summaryAuthorDate
r50766Partial revert of r49700: per Tim, this should probably stay, since it is lik...demon14:51, 19 May 2009

Comments

#Comment by Tim Starling (talk | contribs)   14:05, 19 May 2009

Why are you removing it from the PHP 4 file? Presumably that's the one place it *will* work.

#Comment by 😂 (talk | contribs)   14:51, 19 May 2009

Done in r50766

Status & tagging log