array_shift returns null on empty array, not false
authorMatthew Flaschen <mflaschen@wikimedia.org>
Fri, 31 Jul 2015 01:27:07 +0000 (21:27 -0400)
committerMatthew Flaschen <mflaschen@wikimedia.org>
Fri, 31 Jul 2015 01:27:07 +0000 (21:27 -0400)
Change-Id: I690f9dd0de11ff60f9cba9f401c6e456e7ba8bd6

includes/objectcache/RedisBagOStuff.php

index 7e506f0..11dd660 100644 (file)
@@ -372,7 +372,7 @@ class RedisBagOStuff extends BagOStuff {
                        }
                }
 
-               while ( ( $tag = array_shift( $candidates ) ) !== false ) {
+               while ( ( $tag = array_shift( $candidates ) ) !== null ) {
                        $server = $this->serverTagMap[$tag];
                        $conn = $this->redisPool->getConnection( $server );
                        if ( !$conn ) {