From: Aaron Schulz Date: Thu, 29 Mar 2018 02:42:31 +0000 (-0700) Subject: rdbms: make LoadBalancer::doWait() cast $timeout to an integer X-Git-Tag: 1.31.0-rc.0~64^2 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/%27%241/%40%20%27entree_login%27%20=%3E%20%27Your%20login%27%2C%20%27entree_login_connexion_1%27%20=%3E%20%27Connection%20login%27%2C%20%27entree_login_connexion_2%27%20=%3E%20%27%28Sometimes%20matches%20your%20FTP%20account%20login%20and%20sometimes%20left%20empty%29%27%2C-%27entree_login_ldap%27%20=%3E%20%27Initial%20LDAP%20login%27%2C%20%27entree_mot_passe%27%20=%3E%20%27Your%20password%27%2C%20%27entree_mot_passe_1%27%20=%3E%20%27Password%27%2C%20%27entree_mot_passe_2%27%20=%3E%20%27%28Sometimes%20matches%20your%20FTP%20access%20password%20and%20sometimes%20left%20empty%29%27%2C%40%40%20-150%2C7%20%20121%2C7%20%40%40%20Do%20not%20submit%20this%20import%20request.%3Cp%3EFor%20more%20information%2C%20please%20see%20%3Ca%20href=?a=commitdiff_plain;h=5739d1454b5bc5ae7fe178ac7b92dd2134d7f194;p=lhc%2Fweb%2Fwiklou.git rdbms: make LoadBalancer::doWait() cast $timeout to an integer Make sure that fractional values are not sent to masterPosWait() Change-Id: I0a66471d4bf7005774b5741702c7f9c65bbfd5d0 --- diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php b/includes/libs/rdbms/loadbalancer/LoadBalancer.php index 94acc1ef05..96b6180409 100644 --- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php @@ -591,7 +591,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 );