Page MenuHomePhabricator

GrowthExperiments: GEHelpPanelLinks causing "PHP Notice: Undefined offset: 0"
Closed, ResolvedPublicPRODUCTION ERROR

Description

initGrowthConfig.php somehow resulted in a GEHelpPanelLinks array with keys starting from 1, causing this error:

normalized_message
[{reqId}] {exception_url}   PHP Notice: Undefined offset: 0
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.16/extensions/GrowthExperiments/includes/Specials/SpecialEditGrowthConfig.php(578)
#0 /srv/mediawiki/php-1.37.0-wmf.16/extensions/GrowthExperiments/includes/Specials/SpecialEditGrowthConfig.php(578): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.37.0-wmf.16/extensions/GrowthExperiments/includes/Specials/SpecialEditGrowthConfig.php(646): GrowthExperiments\Specials\SpecialEditGrowthConfig->getFormFields()
#2 /srv/mediawiki/php-1.37.0-wmf.16/extensions/GrowthExperiments/includes/Specials/SpecialEditGrowthConfig.php(723): GrowthExperiments\Specials\SpecialEditGrowthConfig->preprocessSubmittedData(array)
#3 /srv/mediawiki/php-1.37.0-wmf.16/includes/htmlform/HTMLForm.php(719): GrowthExperiments\Specials\SpecialEditGrowthConfig->onSubmit(array, OOUIHTMLForm)
#4 /srv/mediawiki/php-1.37.0-wmf.16/includes/htmlform/HTMLForm.php(609): HTMLForm->trySubmit()
#5 /srv/mediawiki/php-1.37.0-wmf.16/includes/htmlform/HTMLForm.php(625): HTMLForm->tryAuthorizedSubmit()
#6 /srv/mediawiki/php-1.37.0-wmf.16/includes/specialpage/FormSpecialPage.php(187): HTMLForm->show()
#7 /srv/mediawiki/php-1.37.0-wmf.16/extensions/GrowthExperiments/includes/Specials/SpecialEditGrowthConfig.php(114): FormSpecialPage->execute(NULL)
#8 /srv/mediawiki/php-1.37.0-wmf.16/includes/specialpage/SpecialPage.php(646): GrowthExperiments\Specials\SpecialEditGrowthConfig->execute(NULL)
#9 /srv/mediawiki/php-1.37.0-wmf.16/includes/specialpage/SpecialPageFactory.php(1365): SpecialPage->run(NULL)
#10 /srv/mediawiki/php-1.37.0-wmf.16/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#11 /srv/mediawiki/php-1.37.0-wmf.16/includes/MediaWiki.php(925): MediaWiki->performRequest()
#12 /srv/mediawiki/php-1.37.0-wmf.16/includes/MediaWiki.php(559): MediaWiki->main()
#13 /srv/mediawiki/php-1.37.0-wmf.16/index.php(53): MediaWiki->run()
#14 /srv/mediawiki/php-1.37.0-wmf.16/index.php(46): wfIndexMain()
#15 /srv/mediawiki/w/index.php(3): require(string)
#16 {main}

Event Timeline

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

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

[mediawiki/extensions/GrowthExperiments@master] Fix array key handling for GEHelpPanelLinks in on-wiki config

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

Change 709880 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Fix array key handling for GEHelpPanelLinks in on-wiki config

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.17] Fix array key handling for GEHelpPanelLinks in on-wiki config

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.16] Fix array key handling for GEHelpPanelLinks in on-wiki config

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

Change 709984 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.16] Fix array key handling for GEHelpPanelLinks in on-wiki config

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

Mentioned in SAL (#wikimedia-operations) [2021-08-04T18:30:57Z] <urbanecm@deploy1002> Synchronized php-1.37.0-wmf.16/extensions/GrowthExperiments/: 36a2b9f58148dad5434daa6d03b77f4c8b839314: Fix array key handling for GEHelpPanelLinks in on-wiki config (T288023) (duration: 01m 06s)

Change 709983 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.17] Fix array key handling for GEHelpPanelLinks in on-wiki config

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

Mentioned in SAL (#wikimedia-operations) [2021-08-04T18:41:24Z] <urbanecm@deploy1002> Synchronized php-1.37.0-wmf.17/extensions/GrowthExperiments/: 5c3ac582335265287369e2d06332645ddbcba412: Fix array key handling for GEHelpPanelLinks in on-wiki config (T288023) (duration: 01m 08s)

Urbanecm_WMF assigned this task to Tgr.
Urbanecm_WMF added a subscriber: Urbanecm_WMF.

The error should no logner happen (manually verified by introducing the old config to a prod wiki temporarily).