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 Normal.Nov 22 2014, 3:00 AM
bzimport set Reference to bz63310.
bzimport added a subscriber: Unknown Object (MLST).
ori created this task.Mar 31 2014, 5:36 PM

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

aaron added a comment.Apr 9 2014, 6:29 PM

Can this be closed?

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?