Merge "rdbms: make LoadBalancer::doWait() cast $timeout to an integer"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 16 Apr 2018 01:01:21 +0000 (01:01 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 16 Apr 2018 01:01:21 +0000 (01:01 +0000)
includes/libs/rdbms/loadbalancer/LoadBalancer.php

index e2d3b33..96ea949 100644 (file)
@@ -590,7 +590,7 @@ class LoadBalancer implements ILoadBalancer {
         * @return bool
         */
        protected function doWait( $index, $open = false, $timeout = null ) {
-               $timeout = max( 1, $timeout ?: $this->waitTimeout );
+               $timeout = max( 1, intval( $timeout ?: $this->waitTimeout ) );
 
                // Check if we already know that the DB has reached this point
                $server = $this->getServerName( $index );