Page MenuHomePhabricator

Callers of ResourceLoader::getModule should check for null return values
Closed, ResolvedPublic

Description

As a rule, callers of ResourceLoader::getModule() in includes/resourceloader/ResourceLoader.php do not guard against a null return value, and simply assume it is a ResourceLoaderModule object.

Exceptions on attempts to call methods on non-objects are the current (superficial) cause of missing CSS / JS on http://en.hhvm.beta.wmflabs.org/wiki/Main_Page. The deeper cause is probably that en.hhvm.beta.wmflabs.org and en.wikipedia.beta.wmflabs.org share the same DB but load a different set of extensions. Regardless, if it is possible for ResourceLoader::getModule to return null, callers should check for it and react appropriately.


Version: 1.23.0
Severity: normal

Details

Reference
bz63310

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:00 AM
bzimport set Reference to bz63310.
bzimport added a subscriber: Unknown Object (MLST).

Change 123802 had a related patch set uploaded by Ori.livneh:
Callers of ResourceLoader::getModule should check for null return

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

Change 123802 merged by jenkins-bot:
Callers of ResourceLoader::getModule should check for null return

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

Ori: Patch was merged a while ago - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?