Merge "Force $wgCategoryCollation to be uppercase in tests"
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 0e5fddc..cdd0ae9 100644 (file)
@@ -809,9 +809,14 @@ function wfParseUrl( $url ) {
        if ( !isset( $bits['host'] ) ) {
                $bits['host'] = '';
 
-               /* parse_url loses the third / for file:///c:/ urls (but not on variants) */
-               if ( substr( $bits['path'], 0, 1 ) !== '/' ) {
-                       $bits['path'] = '/' . $bits['path'];
+               // bug 45069
+               if ( isset( $bits['path'] ) ) {
+                       /* parse_url loses the third / for file:///c:/ urls (but not on variants) */
+                       if ( substr( $bits['path'], 0, 1 ) !== '/' ) {
+                               $bits['path'] = '/' . $bits['path'];
+                       }
+               } else {
+                       $bits['path'] = '';
                }
        }
 
@@ -1381,9 +1386,13 @@ function wfUILang() {
 }
 
 /**
- * This is the new function for getting translated interface messages.
- * See the Message class for documentation how to use them.
- * The intention is that this function replaces all old wfMsg* functions.
+ * This is the function for getting translated interface messages.
+ *
+ * @see Message class for documentation how to use them.
+ * @see https://www.mediawiki.org/wiki/Manual:Messages_API
+ *
+ * This function replaces all old wfMsg* functions.
+ *
  * @param $key \string Message key.
  * Varargs: normal message parameters.
  * @return Message
@@ -2425,11 +2434,6 @@ define( 'TS_ORACLE', 6 );
  */
 define( 'TS_POSTGRES', 7 );
 
-/**
- * DB2 format time
- */
-define( 'TS_DB2', 8 );
-
 /**
  * ISO 8601 basic format with no timezone: 19860209T200000Z.  This is used by ResourceLoader
  */