Page MenuHomePhabricator

PHP Warning: in_array() expects parameter 2 to be array, null given
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Warning: in_array() expects parameter 2 to be array, null given
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.7/extensions/GrowthExperiments/includes/WelcomeSurvey.php(138)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.37.0-wmf.7/extensions/GrowthExperiments/includes/WelcomeSurvey.php(138): in_array(string, NULL)
#2 /srv/mediawiki/php-1.37.0-wmf.7/extensions/GrowthExperiments/includes/WelcomeSurvey.php(347): GrowthExperiments\WelcomeSurvey->getQuestions(string)
#3 /srv/mediawiki/php-1.37.0-wmf.7/extensions/GrowthExperiments/includes/WelcomeSurveyHooks.php(80): GrowthExperiments\WelcomeSurvey->getRedirectUrl(string)
#4 /srv/mediawiki/php-1.37.0-wmf.7/includes/HookContainer/HookContainer.php(160): GrowthExperiments\WelcomeSurveyHooks->onBeforeWelcomeCreation(string, string)
#5 /srv/mediawiki/php-1.37.0-wmf.7/includes/HookContainer/HookRunner.php(1032): MediaWiki\HookContainer\HookContainer->run(string, array)
#6 /srv/mediawiki/php-1.37.0-wmf.7/includes/specials/SpecialCreateAccount.php(157): MediaWiki\HookContainer\HookRunner->onBeforeWelcomeCreation(string, string)
#7 /srv/mediawiki/php-1.37.0-wmf.7/includes/specialpage/LoginSignupSpecialPage.php(357): SpecialCreateAccount->successfulAction(boolean)
#8 /srv/mediawiki/php-1.37.0-wmf.7/includes/specialpage/SpecialPage.php(646): LoginSignupSpecialPage->execute(NULL)
#9 /srv/mediawiki/php-1.37.0-wmf.7/includes/specialpage/SpecialPageFactory.php(1390): SpecialPage->run(NULL)
#10 /srv/mediawiki/php-1.37.0-wmf.7/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#11 /srv/mediawiki/php-1.37.0-wmf.7/includes/MediaWiki.php(917): MediaWiki->performRequest()
#12 /srv/mediawiki/php-1.37.0-wmf.7/includes/MediaWiki.php(551): MediaWiki->main()
#13 /srv/mediawiki/php-1.37.0-wmf.7/index.php(53): MediaWiki->run()
#14 /srv/mediawiki/php-1.37.0-wmf.7/index.php(46): wfIndexMain()
#15 /srv/mediawiki/w/index.php(3): require(string)
#16 {main}
Impact

Seen 7 times in last 24 hours.

Notes

Seen in the last 12 hours, so something not fixed by the patch for T284599: [BUG] Welcome survey is not being shown to a new account in our experiment

Details

Request URL
https://sk.wikipedia.org/wiki/%C5%A0peci%C3%A1lne:Vytvorenie%C3%9A%C4%8Dtu

Event Timeline

kostajh created this task.

This is caused by T284597: PHP Notice: Undefined index: questions ($groups[ $group ][ 'questions' ] yields a notice for missing questions key, the variable becomes null, and in_array warns).

Change 699198 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[operations/mediawiki-config@master] wgWelcomeSurveyExperimentalGroups: Use new syntax in CS.php

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

Change 699198 merged by jenkins-bot:

[operations/mediawiki-config@master] wgWelcomeSurveyExperimentalGroups: Use new syntax in CS.php

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

Mentioned in SAL (#wikimedia-operations) [2021-06-10T18:05:35Z] <urbanecm@deploy1002> Synchronized wmf-config/CommonSettings.php: d26968c1c3b3f3e115ff37a9a138d225cabba25a: wgWelcomeSurveyExperimentalGroups: Use new syntax in CS.php (T284597; T284735) (duration: 01m 08s)

Etonkovidova subscribed.

The last timestamp for this error (and for [{reqId}] {exception_url} PHP Notice: Undefined index: questions (see T284597)) belongs to wmf.7 https://logstash.wikimedia.org/goto/a3fb4387485c60f02253e51faead88f8.