r68900 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68899‎ | r68900 | r68901 >
Date:19:10, 2 July 2010
Author:ialex
Status:ok
Tags:
Comment:
And one error suppression opertator less (per bug 24159)
Modified paths:
  • /trunk/phase3/includes/ExternalStore.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ExternalStore.php
@@ -32,11 +32,18 @@
3333 if( !$wgExternalStores )
3434 return false;
3535
36 - @list( $proto, $path ) = explode( '://', $url, 2 );
37 - /* Bad URL */
38 - if( $path == '' )
 36+ $parts = explode( '://', $url, 2 );
 37+
 38+ if ( count( $parts ) != 2 ) {
3939 return false;
 40+ }
4041
 42+ list( $proto, $path ) = $parts;
 43+
 44+ if ( $path == '' ) { // Bad URL
 45+ return false;
 46+ }
 47+
4148 $store = self::getStoreObject( $proto, $params );
4249 if ( $store === false )
4350 return false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r68971Two error suppression opertators less (per bug 24159)ialex20:35, 3 July 2010
r69016Removed error suppression opertators (per bug 24159)ialex20:43, 4 July 2010
r69505Removed error suppression operators (per bug 24159)ialex13:16, 18 July 2010
r76244Tests bad URL handling by ExternalStore::fetchFromURL()...hashar13:07, 7 November 2010

Status & tagging log