Change @since and @deprecated notes to 1.22
[lhc/web/wiklou.git] / includes / db / LoadBalancer.php
index f702047..db709b5 100644 (file)
@@ -117,7 +117,7 @@ class LoadBalancer {
         * Given an array of non-normalised probabilities, this function will select
         * an element and return the appropriate key
         *
-        * @deprecated 1.21, use ArrayUtils::pickRandom()
+        * @deprecated since 1.21, use ArrayUtils::pickRandom()
         *
         * @param $weights array
         *
@@ -479,6 +479,7 @@ class LoadBalancer {
 
                # Operation-based index
                if ( $i == DB_SLAVE ) {
+                       $this->mLastError = 'Unknown error'; // reset error string
                        $i = $this->getReaderIndex( false, $wiki );
                        # Couldn't find a working server in getReaderIndex()?
                        if ( $i === false ) {