Page MenuHomePhabricator

TypeError: Argument 1 passed to MediaWiki\Extension\Notifications\Api\ApiEchoMute::parsePref() must be of the type string, null given, called in /srv/mediawiki/php-1.44.0-wmf.13/extensions/Echo/includes/Api/ApiEchoMute.php on l
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   TypeError: Argument 1 passed to MediaWiki\Extension\Notifications\Api\ApiEchoMute::parsePref() must be of the type string, null given, called in /srv/mediawiki/php-1.44.0-wmf.13/extensions/Echo/includes/Api/ApiEchoMute.php
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.13/extensions/Echo/includes/Api/ApiEchoMute.php(117)
#0/srv/mediawiki/php-1.44.0-wmf.13/extensions/Echo/includes/Api/ApiEchoMute.php(58)MediaWiki\Extension\Notifications\Api\ApiEchoMute->parsePref(null)
#1/srv/mediawiki/php-1.44.0-wmf.13/includes/api/ApiMain.php(1973)MediaWiki\Extension\Notifications\Api\ApiEchoMute->execute()
#2/srv/mediawiki/php-1.44.0-wmf.13/includes/api/ApiMain.php(941)MediaWiki\Api\ApiMain->executeAction()
#3/srv/mediawiki/php-1.44.0-wmf.13/includes/api/ApiMain.php(912)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#4/srv/mediawiki/php-1.44.0-wmf.13/includes/api/ApiEntryPoint.php(152)MediaWiki\Api\ApiMain->execute()
#5/srv/mediawiki/php-1.44.0-wmf.13/includes/MediaWikiEntryPoint.php(202)MediaWiki\Api\ApiEntryPoint->execute()
#6/srv/mediawiki/php-1.44.0-wmf.13/api.php(44)MediaWiki\MediaWikiEntryPoint->run()
#7/srv/mediawiki/w/api.php(3)require(string)
#8{main}
Impact
Notes

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1114039 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Echo@master] Handle null option value in echomarkread api

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

Without the type hint it would end calling preg_split with null, that seems to throws deprecation notice under php8.1, so this finding helps to make the code future proof.

Urbanecm_WMF edited projects, added: Growth-Team (Current Sprint); removed: Growth-Team.
Urbanecm_WMF moved this task from Incoming to QA on the Growth-Team (Current Sprint) board.

Change #1114039 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Handle null option value in echomute api

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

Change #1115431 had a related patch set uploaded (by Reedy; author: Umherirrender):

[mediawiki/extensions/Echo@wmf/1.44.0-wmf.14] Handle null option value in echomute api

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

Reedy assigned this task to Umherirrender.

Change #1115431 merged by jenkins-bot:

[mediawiki/extensions/Echo@wmf/1.44.0-wmf.14] Handle null option value in echomute api

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