]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blobdiff - includes/ExternalStore.php
MediaWiki 1.17.0
[autoinstalls/mediawiki.git] / includes / ExternalStore.php
index 6a7790793f1f44f0dda5af555843c561142f00e7..ddb40c32dccfd0aee34216f4739bcf765e019d04 100644 (file)
@@ -32,10 +32,17 @@ class ExternalStore {
                if( !$wgExternalStores )
                        return false;
 
-               @list( $proto, $path ) = explode( '://', $url, 2 );
-               /* Bad URL */
-               if( $path == '' )
+               $parts = explode( '://', $url, 2 );
+
+               if ( count( $parts ) != 2 ) {
+                       return false;
+               }
+
+               list( $proto, $path ) = $parts;
+
+               if ( $path == '' ) { // Bad URL
                        return false;
+               }
 
                $store = self::getStoreObject( $proto, $params );
                if ( $store === false )