Feature #139
DB error with Mediawiki 1.34+
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/06/2020
Due date:
% Done:
0%
Estimated time:
Description
Im using Mediawiki 1.34 with bad-Behavior 2.2.24
UnexpectedValueException: Invalid server index index #DB_SLAVE
#7 /wiki/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(462): getConnectionIndex
#6 /wiki/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(896): getConnection
#5 /wiki/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1043): getMaintenanceConnectionRef
#4 /wiki/w/includes/GlobalFunctions.php(2576): wfGetDB
#3 /wiki/w/extensions/bad-behavior/bad-behavior-mediawiki.php(171): bb2_mediawiki_entry
#2 /wiki/w/includes/Setup.php(906): require_once
#1 /wiki/w/includes/WebStart.php(81): require
#0 /wiki/w/index.php(41): {main}
Also
ErrorException: PHP Warning: Use of undefined constant DB_SLAVE - assumed 'DB_SLAVE' (this will throw an Error in a future version of PHP)
#4 /wiki/w/extensions/bad-behavior/bad-behavior-mediawiki.php(171): handleError
#3 /wiki/w/extensions/bad-behavior/bad-behavior-mediawiki.php(171): bb2_mediawiki_entry
#2 /wiki/w/includes/Setup.php(906): require_once
#1 /wiki/w/includes/WebStart.php(81): require
#0 /wiki/w/index.php(41): {main}
The second one is warning but Mediawiki treating as error on my side.
These two things are by same code
$dbr = wfGetDB(DB_SLAVE);
On line 171 in /wiki/w/extensions/bad-behavior/bad-behavior-mediawiki.php
I tried to report on blog comments but seems it isn't posted so I reported here.