Page MenuHomePhabricator

ResourceLoader should not fail when registering module by name of empty string
Closed, ResolvedPublic

Description

Author: mdale

Description:

  • ( multiple methods calls to generate local variables ) in ResourceLoader::preloadModuleInfo you set $skin to $context->getSkin(); then for db select call $context->getSkin(); again.
  • In the register call you should check and throw an error for an empty $name argument since it fails in mysterious ways if you happen to mess up your array merges before your register calls.

Version: 1.18.x
Severity: enhancement

Details

Reference
bz26804

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:15 PM
bzimport set Reference to bz26804.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Jan 19 2011, 3:26 AM
Krinkle added a comment.EditedMay 4 2011, 9:00 PM

First one fixed in r87453.

Peter added a subscriber: Peter.Dec 1 2015, 5:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 1 2015, 5:03 PM

Change 322032 had a related patch set uploaded (by Krinkle):
resourceloader: Add tests to verify empty string works

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

Krinkle closed this task as Resolved.Nov 17 2016, 1:15 AM
Krinkle claimed this task.
Krinkle added a project: Performance-Team.
Krinkle set Security to None.
Krinkle removed a subscriber: wikibugs-l-list.

Change 322032 merged by jenkins-bot:
resourceloader: Add tests to verify empty string works

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