Error
- service.version: 1.42.0-wmf.15
- trace.id: b918b114-a829-4ff6-a305-47fa4bc4a91b
- Find trace.id in Logstash
[{reqId}] {exception_url} TypeError: Argument 1 passed to MediaWiki\Parser\Sanitizer::encodeAttribute() must be of the type string, null given, called in /srv/mediawiki/php-1.42.0-wmf.15/includes/xml/Xml.php on line 81
from /srv/mediawiki/php-1.42.0-wmf.15/includes/parser/Sanitizer.php(845) #0 /srv/mediawiki/php-1.42.0-wmf.15/includes/xml/Xml.php(81): MediaWiki\Parser\Sanitizer::encodeAttribute(NULL) #1 /srv/mediawiki/php-1.42.0-wmf.15/includes/xml/Xml.php(55): Xml::expandAttributes(array) #2 /srv/mediawiki/php-1.42.0-wmf.15/includes/xml/Xml.php(299): Xml::element(string, array) #3 /srv/mediawiki/php-1.42.0-wmf.15/includes/xml/Xml.php(417): Xml::input(string, integer, NULL, array) #4 /srv/mediawiki/php-1.42.0-wmf.15/includes/xml/Xml.php(396): Xml::inputLabelSep(string, string, string, integer, NULL, array) #5 /srv/mediawiki/php-1.42.0-wmf.15/extensions/LiquidThreads/includes/LqtView.php(977): Xml::inputLabel(string, string, string, integer, NULL, array) #6 /srv/mediawiki/php-1.42.0-wmf.15/extensions/LiquidThreads/includes/LqtView.php(586): LqtView->getSubjectEditor(string, NULL) #7 /srv/mediawiki/php-1.42.0-wmf.15/extensions/LiquidThreads/includes/LqtView.php(419): LqtView->showNewThreadForm(Article) #8 /srv/mediawiki/php-1.42.0-wmf.15/extensions/LiquidThreads/includes/LqtView.php(489): LqtView->doInlineEditForm() #9 /srv/mediawiki/php-1.42.0-wmf.15/extensions/LiquidThreads/includes/Api/ApiThreadAction.php(902): LqtView::getInlineEditForm(Article, string, NULL, MediaWiki\User\User) #10 [internal function]: MediaWiki\Extension\LiquidThreads\Api\ApiThreadAction->actionInlineEditForm(array, array) #11 /srv/mediawiki/php-1.42.0-wmf.15/extensions/LiquidThreads/includes/Api/ApiThreadAction.php(75): call_user_func_array(array, array) #12 /srv/mediawiki/php-1.42.0-wmf.15/includes/api/ApiMain.php(1942): MediaWiki\Extension\LiquidThreads\Api\ApiThreadAction->execute() #13 /srv/mediawiki/php-1.42.0-wmf.15/includes/api/ApiMain.php(917): ApiMain->executeAction() #14 /srv/mediawiki/php-1.42.0-wmf.15/includes/api/ApiMain.php(888): ApiMain->executeActionWithErrorHandling() #15 /srv/mediawiki/php-1.42.0-wmf.15/api.php(95): ApiMain->execute() #16 /srv/mediawiki/php-1.42.0-wmf.15/api.php(48): wfApiMain() #17 /srv/mediawiki/w/api.php(3): require(string) #18 {main}
Impact
Notes
That is similar to T355751 and the root cause is MediaWiki\Parser\Sanitizer::escapeHtmlAllowEntities() had types added by e263306d40bf968fd95bd3856c71a7c33ca2d44b:
- public static function escapeHtmlAllowEntities( $html ) { + public static function escapeHtmlAllowEntities( string $html ): string {
The change is https://gerrit.wikimedia.org/r/c/mediawiki/core/+/984165 which got merged on January 19th and is first deployed as part of 1.42.0-wmf.15.
MediaWiki-extensions-LiquidThreads needs to be adjusted to not pass a null, my guess that is from
#6 /srv/mediawiki/php-1.42.0-wmf.15/extensions/LiquidThreads/includes/LqtView.php(586): LqtView->getSubjectEditor(string, NULL)