X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FHashRing.php;h=f61c139a99e6399b702c315c274f510c8d68cbcf;hb=31bc1e9c3546a97220cd7c550c57fad3d4f4304d;hp=be40965e8414a651880f58ffe37ae75fdc3d4dbe;hpb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/HashRing.php b/includes/libs/HashRing.php index be40965e84..f61c139a99 100644 --- a/includes/libs/HashRing.php +++ b/includes/libs/HashRing.php @@ -116,11 +116,12 @@ class HashRing { // If more locations are requested, wrap-around and keep adding them reset( $this->ring ); while ( count( $locations ) < $limit ) { - list( $location, ) = each( $this->ring ); + $location = key( $this->ring ); if ( $location === $primaryLocation ) { break; // don't go in circles } $locations[] = $location; + next( $this->ring ); } return $locations;