From c6b05795273e4e5cbded37787b6adf412a17576c Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 2 Jul 2010 19:10:36 +0000 Subject: [PATCH] And one error suppression opertator less (per bug 24159) --- includes/ExternalStore.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/includes/ExternalStore.php b/includes/ExternalStore.php index 6a7790793f..ddb40c32dc 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 ) -- 2.20.1