From 6ec4c12f1361de06176b25f517335d2306cd5d97 Mon Sep 17 00:00:00 2001 From: Kevin Israel Date: Fri, 22 Jul 2016 05:39:27 -0400 Subject: [PATCH] LocalRepo::checkRedirect(): Fix use of __METHOD__ in closure Change-Id: Ic8b4d2d54f1986fe4b52bc595221c9384389379b --- includes/filerepo/LocalRepo.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php index c195241da2..c4730d73ec 100644 --- a/includes/filerepo/LocalRepo.php +++ b/includes/filerepo/LocalRepo.php @@ -195,12 +195,12 @@ class LocalRepo extends FileRepo { $expiry = 86400; // has invalidation, 1 day } - $that = $this; + $method = __METHOD__; $redirDbKey = ObjectCache::getMainWANInstance()->getWithSetCallback( $memcKey, $expiry, - function ( $oldValue, &$ttl, array &$setOpts ) use ( $that, $title ) { - $dbr = $that->getSlaveDB(); // possibly remote DB + function ( $oldValue, &$ttl, array &$setOpts ) use ( $method, $title ) { + $dbr = $this->getSlaveDB(); // possibly remote DB $setOpts += Database::getCacheSetOptions( $dbr ); @@ -213,7 +213,7 @@ class LocalRepo extends FileRepo { 'page_title' => $title->getDBkey(), 'rd_from = page_id' ], - __METHOD__ + $method ); } else { $row = false; -- 2.20.1