From: Aaron Schulz Date: Wed, 7 Sep 2016 04:45:54 +0000 (-0700) Subject: Remove return-by-reference PHP4-ism from getExternalLB() X-Git-Tag: 1.31.0-rc.0~5739 X-Git-Url: https://git.heureux-cyclage.org/w/index.php?a=commitdiff_plain;h=5084962f2f46d9744fcec7f3869c3bb38c7f03a3;p=lhc%2Fweb%2Fwiklou.git Remove return-by-reference PHP4-ism from getExternalLB() Change-Id: Id6184a4a543196c4253dc9d930ac8ac0a9a5b0b0 --- diff --git a/includes/db/loadbalancer/LBFactory.php b/includes/db/loadbalancer/LBFactory.php index 2d91bb7484..a3e5cb6957 100644 --- a/includes/db/loadbalancer/LBFactory.php +++ b/includes/db/loadbalancer/LBFactory.php @@ -185,7 +185,7 @@ abstract class LBFactory implements DestructibleService { * @param bool|string $wiki Wiki ID, or false for the current wiki * @return LoadBalancer */ - abstract public function &getExternalLB( $cluster, $wiki = false ); + abstract public function getExternalLB( $cluster, $wiki = false ); /** * Execute a function for each tracked load balancer diff --git a/includes/db/loadbalancer/LBFactoryFake.php b/includes/db/loadbalancer/LBFactoryFake.php index 33ee2504a3..5cd1d4bde3 100644 --- a/includes/db/loadbalancer/LBFactoryFake.php +++ b/includes/db/loadbalancer/LBFactoryFake.php @@ -40,7 +40,7 @@ class LBFactoryFake extends LBFactory { throw new DBAccessError; } - public function &getExternalLB( $cluster, $wiki = false ) { + public function getExternalLB( $cluster, $wiki = false ) { throw new DBAccessError; } diff --git a/includes/db/loadbalancer/LBFactoryMulti.php b/includes/db/loadbalancer/LBFactoryMulti.php index 17e01b914a..e56631d728 100644 --- a/includes/db/loadbalancer/LBFactoryMulti.php +++ b/includes/db/loadbalancer/LBFactoryMulti.php @@ -293,7 +293,7 @@ class LBFactoryMulti extends LBFactory { * @param bool|string $wiki Wiki ID, or false for the current wiki * @return LoadBalancer */ - public function &getExternalLB( $cluster, $wiki = false ) { + public function getExternalLB( $cluster, $wiki = false ) { if ( !isset( $this->extLBs[$cluster] ) ) { $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $wiki ); $this->extLBs[$cluster]->parentInfo( [ 'id' => "ext-$cluster" ] ); diff --git a/includes/db/loadbalancer/LBFactorySimple.php b/includes/db/loadbalancer/LBFactorySimple.php index 262b0d9b9e..4632b0adc1 100644 --- a/includes/db/loadbalancer/LBFactorySimple.php +++ b/includes/db/loadbalancer/LBFactorySimple.php @@ -122,7 +122,7 @@ class LBFactorySimple extends LBFactory { * @param bool|string $wiki * @return array */ - public function &getExternalLB( $cluster, $wiki = false ) { + public function getExternalLB( $cluster, $wiki = false ) { if ( !isset( $this->extLBs[$cluster] ) ) { $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $wiki ); $this->extLBs[$cluster]->parentInfo( [ 'id' => "ext-$cluster" ] ); diff --git a/includes/db/loadbalancer/LBFactorySingle.php b/includes/db/loadbalancer/LBFactorySingle.php index 14c1c283e6..14cec0ee7d 100644 --- a/includes/db/loadbalancer/LBFactorySingle.php +++ b/includes/db/loadbalancer/LBFactorySingle.php @@ -73,7 +73,7 @@ class LBFactorySingle extends LBFactory { * @param bool|string $wiki Wiki ID, or false for the current wiki * @return LoadBalancerSingle */ - public function &getExternalLB( $cluster, $wiki = false ) { + public function getExternalLB( $cluster, $wiki = false ) { return $this->lb; }