From 13dd2b95c2aebfeea429be308e20bd8b40d19725 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 30 Sep 2018 13:09:46 +0200 Subject: [PATCH] Fix caller name in ClassicInterwikiLookup::load Seeing MediaWiki\Interwiki\{closure} in the logs as caller is not helpful Change-Id: I39af68a02d40667e428c7f30c88aacab8a02cd86 --- includes/interwiki/ClassicInterwikiLookup.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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'; -- 2.20.1