From: Alexandre Emsenhuber Date: Fri, 2 Jul 2010 19:10:36 +0000 (+0000) Subject: And one error suppression opertator less (per bug 24159) X-Git-Tag: 1.31.0-rc.0~36300 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=c6b05795273e4e5cbded37787b6adf412a17576c;p=lhc%2Fweb%2Fwiklou.git And one error suppression opertator less (per bug 24159) --- 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 )