Page MenuHomePhabricator

PHP Notice: Array to string conversion
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Notice: Array to string conversion
exception.trace
from /srv/mediawiki/php-1.38.0-wmf.7/includes/language/Message.php(1271)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.38.0-wmf.7/includes/language/Message.php(1271): strtr(string, array)
#2 /srv/mediawiki/php-1.38.0-wmf.7/includes/language/Message.php(963): Message->replaceParameters(string, string, string)
#3 /srv/mediawiki/php-1.38.0-wmf.7/includes/language/Message.php(1048): Message->format(string)
#4 /srv/mediawiki/php-1.38.0-wmf.7/includes/logging/LogPage.php(264): Message->escaped()
#5 /srv/mediawiki/php-1.38.0-wmf.7/includes/logging/LegacyLogFormatter.php(82): LogPage::actionText(string, string, Title, SkinVector, array, boolean)
#6 /srv/mediawiki/php-1.38.0-wmf.7/includes/logging/LogFormatter.php(465): LegacyLogFormatter->getActionMessage()
#7 /srv/mediawiki/php-1.38.0-wmf.7/includes/changes/ChangesList.php(706): LogFormatter->getActionText()
#8 /srv/mediawiki/php-1.38.0-wmf.7/includes/changes/OldChangesList.php(128): ChangesList->insertLogEntry(RecentChange)
#9 /srv/mediawiki/php-1.38.0-wmf.7/includes/changes/OldChangesList.php(48): OldChangesList->formatChangeLine(RecentChange, array, boolean)
#10 /srv/mediawiki/php-1.38.0-wmf.7/includes/specials/SpecialRecentChanges.php(507): OldChangesList->recentChangesLine(RecentChange, boolean, integer)
#11 /srv/mediawiki/php-1.38.0-wmf.7/includes/specialpage/ChangesListSpecialPage.php(1665): SpecialRecentChanges->outputChangesList(Wikimedia\Rdbms\MysqliResultWrapper, FormOptions)
#12 /srv/mediawiki/php-1.38.0-wmf.7/includes/specialpage/ChangesListSpecialPage.php(660): ChangesListSpecialPage->webOutput(Wikimedia\Rdbms\MysqliResultWrapper, FormOptions)
#13 /srv/mediawiki/php-1.38.0-wmf.7/includes/specials/SpecialRecentChanges.php(199): ChangesListSpecialPage->execute(NULL)
#14 /srv/mediawiki/php-1.38.0-wmf.7/includes/specialpage/SpecialPage.php(647): SpecialRecentChanges->execute(NULL)
#15 /srv/mediawiki/php-1.38.0-wmf.7/includes/specialpage/SpecialPageFactory.php(1368): SpecialPage->run(NULL)
#16 /srv/mediawiki/php-1.38.0-wmf.7/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#17 /srv/mediawiki/php-1.38.0-wmf.7/includes/MediaWiki.php(925): MediaWiki->performRequest()
#18 /srv/mediawiki/php-1.38.0-wmf.7/includes/MediaWiki.php(559): MediaWiki->main()
#19 /srv/mediawiki/php-1.38.0-wmf.7/index.php(53): MediaWiki->run()
#20 /srv/mediawiki/php-1.38.0-wmf.7/index.php(46): wfIndexMain()
#21 /srv/mediawiki/w/index.php(3): require(string)
#22 {main}
Impact

~900 errors in a 15 minute time period.

Notes

This only started after rollback from 1.38.0-wmf.9

Details

Request URL
https://meta.wikimedia.org/wiki/Special:RecentChanges

Event Timeline

jeena triaged this task as Unbreak Now! priority.

I'm guessing this is caused by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/737165, as the old log formatter system does not understand entries created by the new system. It's also causing pages like https://meta.wikimedia.org/w/index.php?title=Special:Log&logid=44476939 to display incorrectly (note "Array" instead of "locked" or "(none)") Not sure if we can do anything to it easily, sorry :(

This only started after rollback from 1.38.0-wmf.9

Unfortunately, during its short window, some log entries were inserted in a way only the new version of CentralAuth handles, but the old version does not.
I hope this will be resolved when 1.38.0-wmf.9 is re-deployed.

jeena lowered the priority of this task from Unbreak Now! to Needs Triage.Nov 18 2021, 5:38 PM

Not seeing this in Logstash anymore. Closing.

https://meta.wikimedia.org/wiki/Special:Log?type=gblrights&subtype=usergroups still displays some "from Array to Array" (example). But only for a few entries between the 9th and 10th December.

https://meta.wikimedia.org/wiki/Special:Log?type=gblrights&subtype=usergroups still displays some "from Array to Array" (example). But only for a few entries between the 9th and 10th December.

For reference, the problem is gone and they are now displayed correctly.