X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWikiMap.php;h=9dc3bfeedf998b9d129dc5ea2a2bcc383b4b087c;hb=039d957b43dda31439d43d34db5aa7175798dbbf;hp=8bb37b5c882a7a599d63ab658cdaa4a5bfc80a88;hpb=a8379682a46a428320c88702c800a6107c015137;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WikiMap.php b/includes/WikiMap.php index 8bb37b5c88..9dc3bfeedf 100644 --- a/includes/WikiMap.php +++ b/includes/WikiMap.php @@ -104,7 +104,7 @@ class WikiMap { $path .= '?' . $urlParts['query']; } - $canonicalServer = isset( $urlParts['scheme'] ) ? $urlParts['scheme'] : 'http'; + $canonicalServer = $urlParts['scheme'] ?? 'http'; $canonicalServer .= '://' . $urlParts['host']; return new WikiReference( $canonicalServer, $path ); @@ -131,7 +131,7 @@ class WikiMap { * * @param string $wikiID Wiki'd id (generally database name) * @param string $user User name (must be normalised before calling this function!) - * @param string $text Link's text; optional, default to "User:$user" + * @param string|null $text Link's text; optional, default to "User:$user" * @return string HTML link or false if the wiki was not found */ public static function foreignUserLink( $wikiID, $user, $text = null ) { @@ -143,7 +143,7 @@ class WikiMap { * * @param string $wikiID Wiki'd id (generally database name) * @param string $page Page name (must be normalised before calling this function!) - * @param string $text Link's text; optional, default to $page + * @param string|null $text Link's text; optional, default to $page * @return string|false HTML link or false if the wiki was not found */ public static function makeForeignLink( $wikiID, $page, $text = null ) {