From: Aaron Schulz Date: Thu, 3 Nov 2016 21:01:08 +0000 (-0700) Subject: Make LBFactorySingle external LB methods throw exceptions X-Git-Tag: 1.31.0-rc.0~4961 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=4fc3e9e92e1436cbcb9526c06fd1db3a22c7d71c;p=lhc%2Fweb%2Fwiklou.git Make LBFactorySingle external LB methods throw exceptions There are no external clusters with this LB factory class, so calling these methods makes no sense. Change-Id: I63a9c6c76ba036980cfaab3ef03574295e46c6bf --- diff --git a/includes/libs/rdbms/lbfactory/LBFactorySingle.php b/includes/libs/rdbms/lbfactory/LBFactorySingle.php index e1168882ac..94246140b6 100644 --- a/includes/libs/rdbms/lbfactory/LBFactorySingle.php +++ b/includes/libs/rdbms/lbfactory/LBFactorySingle.php @@ -70,20 +70,12 @@ class LBFactorySingle extends LBFactory { return $this->lb; } - /** - * @param string $cluster External storage cluster name (unused) - * @return LoadBalancerSingle - */ public function newExternalLB( $cluster ) { - return $this->lb; + throw new BadMethodCallException( "Method is not supported." ); } - /** - * @param string $cluster External storage cluster name (unused) - * @return LoadBalancerSingle - */ public function getExternalLB( $cluster ) { - return $this->lb; + throw new BadMethodCallException( "Method is not supported." ); } /**