summaryrefslogtreecommitdiff
path: root/includes/ExternalStore.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/ExternalStore.php')
-rw-r--r--includes/ExternalStore.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/includes/ExternalStore.php b/includes/ExternalStore.php
index 6a779079..ddb40c32 100644
--- a/includes/ExternalStore.php
+++ b/includes/ExternalStore.php
@@ -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 )