From: Chad Horohoe Date: Tue, 13 Sep 2016 21:07:32 +0000 (-0700) Subject: Avoid warnings when unable to parse the URL given to us X-Git-Tag: 1.31.0-rc.0~5604 X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=3635881b44a3b1069b1f44218fe6269cb2dfd3df Avoid warnings when unable to parse the URL given to us Change-Id: I56f1f36a3a54c6c23579f011d65dc75f30cb6dcf --- diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 7f20de19d2..0bd183f1d0 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -648,7 +648,11 @@ class MediaWiki { ); foreach ( $clusterHosts as $clusterHost ) { - $infoHost = array_intersect_key( wfParseUrl( $clusterHost ), $relevantKeys ); + $parseUrl = wfParseUrl( $clusterHost ); + if ( !$parseUrl ) { + continue; + } + $infoHost = array_intersect_key( $parseUrl, $relevantKeys ); if ( $infoCandidate === $infoHost ) { return true; }