From 4fc3e9e92e1436cbcb9526c06fd1db3a22c7d71c Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 3 Nov 2016 14:01:08 -0700 Subject: [PATCH] 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 --- includes/libs/rdbms/lbfactory/LBFactorySingle.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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." ); } /** -- 2.20.1