List of steps to reproduce:
- Setup your main object stash to be DB-backed (this is the default setting of MediaWiki) by adding $wgMainStash = 'db-replicated'; at the end of LocalSettings.php.
- Try using the setMulti() method on the main stash. An example for this in MW's REPL is shown below.
>>> $s = \MediaWiki\MediaWikiServices::getInstance()->getMainObjectStash() => ReplicatedBagOStuff {#2825} >>> $s->setMulti(['key' => 'val']) <warning>PHP Warning: Invalid argument supplied for foreach() in /vagrant/mediawiki/includes/libs/objectcache/BagOStuff.php on line 755</warning> => []
Any valid call to the setMulti method will trigger a PHP warning that will also show up in logs and on the web pages (ugh).
The culprit can be found in the ReplicatedBagOStuff::setMulti method (source for 1.36) which calls the proxyCall method with RES_KEYMAP as its third argument, instead of RES_NONKEY (because setMulti returns a bool, not an array).
Software version:
I have verified this on 1.36 and current master. It's possible older versions are affected as well.