From 242e45906276910519a30530d87641b9b54c92f8 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Fri, 26 Jan 2007 13:48:25 +0000 Subject: [PATCH] wfGetDB() and wfGetDB(DB_SLAVE) would crash if no previous connections were opened. --- includes/LoadBalancer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1