From: Aaron Schulz Date: Sun, 24 Mar 2019 03:07:56 +0000 (-0700) Subject: Fix overzealous prefix check in MWLBFactory X-Git-Tag: 1.34.0-rc.0~2391 X-Git-Url: https://git.cyclocoop.org/admin/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27new_vote%27%29%20%7D%7D?a=commitdiff_plain;h=0449f653c7147328e9ddcce9861733fc29e6f961;p=lhc%2Fweb%2Fwiklou.git Fix overzealous prefix check in MWLBFactory Follow-up 9df277a4ba3 If the server array ommitted 'tablePrefix', Database will use '' as the prefix, so if $wgDBprefix is also '', then no error should happen. Change-Id: Ic207c3fceae8fd45c87f7fa24678079217a60730 --- diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php index a930b3b0eb..6ed693ecb3 100644 --- a/includes/db/MWLBFactory.php +++ b/includes/db/MWLBFactory.php @@ -109,7 +109,7 @@ abstract class MWLBFactory { } $ldTP = $mainConfig->get( 'DBprefix' ); // local domain prefix - $srvTP = $server['tablePrefix'] ?? null; // server table prefix + $srvTP = $server['tablePrefix'] ?? ''; // server table prefix if ( $srvTP !== '' && $srvTP !== $ldTP ) { self::reportMismatchedPrefixes( $srvTP, $ldTP ); }