From: Domas Mituzas Date: Fri, 26 Jan 2007 13:48:25 +0000 (+0000) Subject: wfGetDB() and wfGetDB(DB_SLAVE) would crash if no previous connections were opened. X-Git-Tag: 1.31.0-rc.0~54176 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=242e45906276910519a30530d87641b9b54c92f8;p=lhc%2Fweb%2Fwiklou.git wfGetDB() and wfGetDB(DB_SLAVE) would crash if no previous connections were opened. --- diff --git a/includes/LoadBalancer.php b/includes/LoadBalancer.php index 145bc5a7b0..f256b7e7f8 100644 --- a/includes/LoadBalancer.php +++ b/includes/LoadBalancer.php @@ -30,7 +30,7 @@ class LoadBalancer { $this->mWriteIndex = -1; $this->mForce = -1; $this->mConnections = array(); - $this->mLastIndex = 1; + $this->mLastIndex = -1; $this->mLoads = array(); $this->mWaitForFile = false; $this->mWaitForPos = false;