Page MenuHomePhabricator

InvalidArgumentException in ProtectSite on MediaWiki 1.39
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

  • Install and enable ProtectSite
  • Open MediaWiki
  • An InvalidArgumentException occurs

What happens?:
SqlBagOStuff::__construct requires 'server', 'servers', or 'loadBalancerCallback' is returned upon simply opening MediaWiki with ProtectSite enabled

What should have happened instead?:
It shouldn't throw exception

Software version: 1.39.0-beta

This seems to be caused by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/798030 which removes 'localKeyLB' from SqlBagOStuff, and requires one of 'server', 'servers', or 'loadBalancerCallback', which isn't provided by ProtectSite in ProtectSite::setup()

Event Timeline

SqlBagOStuff is not newable and its constructor is explicitly marked as @internal. Nothing should try to create new instances like that.

Change 831620 had a related patch set uploaded (by Jack Phoenix; author: Jack Phoenix):

[mediawiki/extensions/ProtectSite@master] Don't manually initialize a SqlBagOStuff instance

https://gerrit.wikimedia.org/r/831620

Change 831620 merged by jenkins-bot:

[mediawiki/extensions/ProtectSite@master] Don't manually initialize a SqlBagOStuff instance

https://gerrit.wikimedia.org/r/831620

Change 878146 had a related patch set uploaded (by Universal Omega; author: Jack Phoenix):

[mediawiki/extensions/ProtectSite@REL1_39] Don't manually initialize a SqlBagOStuff instance

https://gerrit.wikimedia.org/r/878146

Change 878146 merged by jenkins-bot:

[mediawiki/extensions/ProtectSite@REL1_39] Don't manually initialize a SqlBagOStuff instance

https://gerrit.wikimedia.org/r/878146