From: Roan Kattouw Date: Fri, 14 Oct 2016 21:15:46 +0000 (-0700) Subject: MediaWiki.php: Make getUrlDomainDistance() actually static X-Git-Tag: 1.31.0-rc.0~5102^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=e98dc4f3c2ec75a3d2ba91349d303c985df25d99;p=lhc%2Fweb%2Fwiklou.git MediaWiki.php: Make getUrlDomainDistance() actually static It's only called once, and that call is static. It also doesn't use $this. [error] /w/index.php?title=New_new_page&action=purge ErrorException from line 610 of /vagrant/mediawiki/includes/MediaWiki.php: PHP Strict Standards: Non-static method MediaWiki::getUrlDomainDistance() should not be called statically Change-Id: Ice66937a32193720c52df39bcea90659a8d9f653 --- diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 218337a95a..f21128e59e 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -678,7 +678,7 @@ class MediaWiki { * @param IContextSource $context * @return string|bool Either "local" or "remote" if in the farm, false otherwise */ - private function getUrlDomainDistance( $url, IContextSource $context ) { + private static function getUrlDomainDistance( $url, IContextSource $context ) { static $relevantKeys = [ 'host' => true, 'port' => true ]; $infoCandidate = wfParseUrl( $url );