LocalRepo::checkRedirect(): Fix use of __METHOD__ in closure
authorKevin Israel <pleasestand@live.com>
Fri, 22 Jul 2016 09:39:27 +0000 (05:39 -0400)
committerUmherirrender <umherirrender_de.wp@web.de>
Sat, 5 Nov 2016 21:07:16 +0000 (21:07 +0000)
Change-Id: Ic8b4d2d54f1986fe4b52bc595221c9384389379b

includes/filerepo/LocalRepo.php

index c195241..c4730d7 100644 (file)
@@ -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;