wfGetDB() and wfGetDB(DB_SLAVE) would crash if no previous connections were opened.
authorDomas Mituzas <midom@users.mediawiki.org>
Fri, 26 Jan 2007 13:48:25 +0000 (13:48 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Fri, 26 Jan 2007 13:48:25 +0000 (13:48 +0000)
includes/LoadBalancer.php

index 145bc5a..f256b7e 100644 (file)
@@ -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;