Page MenuHomePhabricator

Argument 2 passed to MediaWiki\Extension\AbuseFilter\VariableGenerator\RunVariableGenerator::getStashEditVars() must be of the type string, null given
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.35.0-wmf.20

message
Argument 2 passed to MediaWiki\Extension\AbuseFilter\VariableGenerator\RunVariableGenerator::getStashEditVars() must be of the type string, null given, called in /srv/mediawiki/php-1.35.0-wmf.20/extensions/AbuseFilter/includes/AbuseFilterHooks.php on line 820

Impact

Unsure. Since it happens in a deferred update during edit stashing, it may just cause the edit not to be stashed, without the user knowing. Seen 6 times in the last 24h.

Notes

It complains about the summary being null. However, the summary is given by the ParserOutputStashForEdit hook, which is only documented to pass strings. IMHO it should be fixed in core, and it shouldn't pass null. If the summary is empty, passing an empty string seems more reasonable. Downstream (in the hook handler), we should add typehints.

Details

Request ID
XlDslwpAMNkAAv@6140AAADJ
Request URL
https://sv.wikipedia.org/w/api.php
Stack Trace
exception.trace
#0 /srv/mediawiki/php-1.35.0-wmf.20/extensions/AbuseFilter/includes/AbuseFilterHooks.php(820): MediaWiki\Extension\AbuseFilter\VariableGenerator\RunVariableGenerator->getStashEditVars(WikitextContent, NULL, string, WikiPage)
#1 /srv/mediawiki/php-1.35.0-wmf.20/includes/deferred/MWCallableUpdate.php(38): AbuseFilterHooks::{closure}()
#2 /srv/mediawiki/php-1.35.0-wmf.20/includes/deferred/DeferredUpdates.php(417): MWCallableUpdate->doUpdate()
#3 /srv/mediawiki/php-1.35.0-wmf.20/includes/deferred/DeferredUpdates.php(296): DeferredUpdates::attemptUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti)
#4 /srv/mediawiki/php-1.35.0-wmf.20/includes/deferred/DeferredUpdates.php(233): DeferredUpdates::run(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti, Monolog\Logger, BufferingStatsdDataFactory, string)
#5 /srv/mediawiki/php-1.35.0-wmf.20/includes/deferred/DeferredUpdates.php(146): DeferredUpdates::handleUpdateQueue(array, string, integer)
#6 /srv/mediawiki/php-1.35.0-wmf.20/includes/MediaWiki.php(673): DeferredUpdates::doUpdates(string, integer)
#7 /srv/mediawiki/php-1.35.0-wmf.20/includes/api/ApiMain.php(548): MediaWiki::preOutputCommit(DerivativeContext)
#8 /srv/mediawiki/php-1.35.0-wmf.20/includes/api/ApiMain.php(493): ApiMain->executeActionWithErrorHandling()
#9 /srv/mediawiki/php-1.35.0-wmf.20/api.php(84): ApiMain->execute()
#10 /srv/mediawiki/w/api.php(3): require(string)
#11 {main}

Event Timeline

Change 574196 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/core@master] stashedit: Ensure that $summary is a string

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

Change 574197 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Add string typehint to $summary in onParserOutputStashForEdit

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

Change 574196 merged by jenkins-bot:
[mediawiki/core@master] stashedit: Ensure that $summary is a string

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

Change 574197 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Add string typehint to $summary in onParserOutputStashForEdit

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

Jdforrester-WMF moved this task from Untriaged to Resolved on the Wikimedia-production-error board.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Presuming this will fix the issue when it rolls out in wmf.22; let's re-open if it doesn't.