Page MenuHomePhabricator

PHP Warning: Invalid argument supplied for foreach() at GlobalFunctions (from GrowthExperiments WelcomeSurveyHooks.php)
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Warning: Invalid argument supplied for foreach()
exception.trace
from /srv/mediawiki/php-1.39.0-wmf.23/includes/GlobalFunctions.php(345)
#0 /srv/mediawiki/php-1.39.0-wmf.23/includes/GlobalFunctions.php(345): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.39.0-wmf.23/extensions/GrowthExperiments/includes/WelcomeSurveyHooks.php(126): wfArrayToCgi(boolean)
#2 /srv/mediawiki/php-1.39.0-wmf.23/includes/HookContainer/HookContainer.php(160): GrowthExperiments\WelcomeSurveyHooks->onCentralAuthPostLoginRedirect(string, string, boolean, string, string)
#3 /srv/mediawiki/php-1.39.0-wmf.23/extensions/CentralAuth/includes/Hooks/CentralAuthHookRunner.php(54): MediaWiki\HookContainer\HookContainer->run(string, array)
#4 /srv/mediawiki/php-1.39.0-wmf.23/extensions/CentralAuth/includes/Special/SpecialCentralLogin.php(328): MediaWiki\Extension\CentralAuth\Hooks\CentralAuthHookRunner->onCentralAuthPostLoginRedirect(string, string, boolean, string, string)
#5 /srv/mediawiki/php-1.39.0-wmf.23/extensions/CentralAuth/includes/Special/SpecialCentralLogin.php(85): MediaWiki\Extension\CentralAuth\Special\SpecialCentralLogin->doLoginComplete(string)
#6 /srv/mediawiki/php-1.39.0-wmf.23/includes/specialpage/SpecialPage.php(690): MediaWiki\Extension\CentralAuth\Special\SpecialCentralLogin->execute(string)
#7 /srv/mediawiki/php-1.39.0-wmf.23/includes/specialpage/SpecialPageFactory.php(1423): SpecialPage->run(string)
#8 /srv/mediawiki/php-1.39.0-wmf.23/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#9 /srv/mediawiki/php-1.39.0-wmf.23/includes/MediaWiki.php(905): MediaWiki->performRequest()
#10 /srv/mediawiki/php-1.39.0-wmf.23/includes/MediaWiki.php(562): MediaWiki->main()
#11 /srv/mediawiki/php-1.39.0-wmf.23/index.php(50): MediaWiki->run()
#12 /srv/mediawiki/php-1.39.0-wmf.23/index.php(46): wfIndexMain()
#13 /srv/mediawiki/w/index.php(3): require(string)
#14 {main}
Impact

Low volume. There have been 60 of these reported since August 15, 2022. There are no hits before that.

Event Timeline

dancy renamed this task from PHP Warning: Invalid argument supplied for foreach() to PHP Warning: Invalid argument supplied for foreach() at includes/GlobalFunctions.php:345.Aug 18 2022, 4:37 PM
Zabe subscribed.

Rather seems to be a GrowthExperiments issue. The starting timestamp matches the deployment of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/751209.

kostajh triaged this task as High priority.Aug 22 2022, 9:19 AM
Krinkle renamed this task from PHP Warning: Invalid argument supplied for foreach() at includes/GlobalFunctions.php:345 to PHP Warning: Invalid argument supplied for foreach() at GlobalFunctions (from GrowthExperiments WelcomeSurveyHooks.php).Aug 23 2022, 3:07 PM
Krinkle moved this task from Untriaged to Aug 2022 on the Wikimedia-production-error board.

Change 826774 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Fix WelcomeSurvey CentralAuthPostLoginRedirect hook

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

Change 827191 had a related patch set uploaded (by Kosta Harlan; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@wmf/1.39.0-wmf.26] Fix WelcomeSurvey CentralAuthPostLoginRedirect hook

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

Change 827191 abandoned by Kosta Harlan:

[mediawiki/extensions/GrowthExperiments@wmf/1.39.0-wmf.26] Fix WelcomeSurvey CentralAuthPostLoginRedirect hook

Reason:

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

Change 826774 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Fix WelcomeSurvey CentralAuthPostLoginRedirect hook

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

Change 827191 restored by Gergő Tisza:

[mediawiki/extensions/GrowthExperiments@wmf/1.39.0-wmf.26] Fix WelcomeSurvey CentralAuthPostLoginRedirect hook

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

Change 827191 merged by Clare Ming:

[mediawiki/extensions/GrowthExperiments@wmf/1.39.0-wmf.26] Fix WelcomeSurvey CentralAuthPostLoginRedirect hook (step 1)

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

Mentioned in SAL (#wikimedia-operations) [2022-08-29T21:01:33Z] <cjming@deploy1002> Synchronized php-1.39.0-wmf.26/extensions/GrowthExperiments/includes/WelcomeSurveyHooks.php: Backport: [[gerrit:827191|Fix WelcomeSurvey CentralAuthPostLoginRedirect hook (step 1) (T315583 T316311)]] (duration: 03m 36s)

Etonkovidova subscribed.

Checked wmf.27 - the last timestamp Aug 29, 2022 @ 20:45:10.867 (logstash link).