Fix bug 26570 (user CSS preview broken) and bug 26555 (styles added with $out->addSty...
[lhc/web/wiklou.git] / includes / ExternalStore.php
index 6a77907..ddb40c3 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 )