From e98dc4f3c2ec75a3d2ba91349d303c985df25d99 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 14 Oct 2016 14:15:46 -0700 Subject: [PATCH] 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 --- includes/MediaWiki.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); -- 2.20.1