Merge "SpecialRevisiondelete: Do not pass unused parameter"
[lhc/web/wiklou.git] / includes / Storage / NameTableStore.php
index 6c7919d..27194ab 100644 (file)
@@ -205,7 +205,7 @@ class NameTableStore {
         *
         * @param int $connFlags ILoadBalancer::CONN_XXX flags. Optional.
         *
-        * @return \string[] The freshly reloaded name map
+        * @return string[] The freshly reloaded name map
         */
        public function reloadMap( $connFlags = 0 ) {
                $this->tableCache = $this->loadTable(
@@ -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
                                                );
                                        }