From: Umherirrender Date: Sun, 30 Sep 2018 15:02:46 +0000 (+0200) Subject: Fix logged method in NameTableStore::getName X-Git-Tag: 1.34.0-rc.0~3948 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%22%20.%20%22?a=commitdiff_plain;h=fe84fb4ba2be2ea7756ebd35d368a59e4f6efce8;p=lhc%2Fweb%2Fwiklou.git Fix logged method in NameTableStore::getName Seeing {closure} in the logs as caller is not helpful Change-Id: I6a54ebf87024706b7890c7fe003b5380933fe861 --- diff --git a/includes/Storage/NameTableStore.php b/includes/Storage/NameTableStore.php index 6c7919d254..c1dd09dfb7 100644 --- a/includes/Storage/NameTableStore.php +++ b/includes/Storage/NameTableStore.php @@ -262,11 +262,12 @@ class NameTableStore { if ( array_key_exists( $id, $table ) ) { return $table[$id]; } + $fname = __METHOD__; $table = $this->cache->getWithSetCallback( $this->getCacheKey(), $this->cacheTTL, - function ( $oldValue, &$ttl, &$setOpts ) use ( $id ) { + function ( $oldValue, &$ttl, &$setOpts ) use ( $id, $fname ) { // Check if cached value is up-to-date enough to have $id if ( is_array( $oldValue ) && array_key_exists( $id, $oldValue ) ) { // Completely leave the cache key alone @@ -279,7 +280,7 @@ class NameTableStore { // Log a fallback to master if ( $source === DB_MASTER ) { $this->logger->info( - __METHOD__ . 'falling back to master select from ' . + $fname . ' falling back to master select from ' . $this->table . ' with id ' . $id ); }