From: Umherirrender Date: Sun, 30 Sep 2018 11:09:46 +0000 (+0200) Subject: Fix caller name in ClassicInterwikiLookup::load X-Git-Tag: 1.34.0-rc.0~3958 X-Git-Url: http://git.cyclocoop.org/data/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=13dd2b95c2aebfeea429be308e20bd8b40d19725;p=lhc%2Fweb%2Fwiklou.git Fix caller name in ClassicInterwikiLookup::load Seeing MediaWiki\Interwiki\{closure} in the logs as caller is not helpful Change-Id: I39af68a02d40667e428c7f30c88aacab8a02cd86 --- diff --git a/includes/interwiki/ClassicInterwikiLookup.php b/includes/interwiki/ClassicInterwikiLookup.php index 05cf933345..cdf4cde618 100644 --- a/includes/interwiki/ClassicInterwikiLookup.php +++ b/includes/interwiki/ClassicInterwikiLookup.php @@ -279,10 +279,11 @@ class ClassicInterwikiLookup implements InterwikiLookup { } } + $fname = __METHOD__; $iwData = $this->objectCache->getWithSetCallback( $this->objectCache->makeKey( 'interwiki', $prefix ), $this->objectCacheExpiry, - function ( $oldValue, &$ttl, array &$setOpts ) use ( $prefix ) { + function ( $oldValue, &$ttl, array &$setOpts ) use ( $prefix, $fname ) { $dbr = wfGetDB( DB_REPLICA ); // TODO: inject LoadBalancer $setOpts += Database::getCacheSetOptions( $dbr ); @@ -291,7 +292,7 @@ class ClassicInterwikiLookup implements InterwikiLookup { 'interwiki', self::selectFields(), [ 'iw_prefix' => $prefix ], - __METHOD__ + $fname ); return $row ? (array)$row : '!NONEXISTENT';