Index: trunk/phase3/includes/ResourceLoaderContext.php |
— | — | @@ -50,7 +50,8 @@ |
51 | 51 | $this->resourceLoader = $resourceLoader; |
52 | 52 | $this->request = $request; |
53 | 53 | // Interperet request |
54 | | - $this->modules = explode( '|', $request->getVal( 'modules' ) ); |
| 54 | + $modules = $request->getVal( 'modules' ); |
| 55 | + $this->modules = $modules ? explode( '|', $modules ) : array(); |
55 | 56 | $this->language = $request->getVal( 'lang' ); |
56 | 57 | $this->direction = $request->getVal( 'dir' ); |
57 | 58 | $this->skin = $request->getVal( 'skin' ); |
Index: trunk/phase3/includes/ResourceLoader.php |
— | — | @@ -44,6 +44,9 @@ |
45 | 45 | * @param $context ResourceLoaderContext context to load the information within |
46 | 46 | */ |
47 | 47 | protected function preloadModuleInfo( array $modules, ResourceLoaderContext $context ) { |
| 48 | + if ( !count( $modules ) ) { |
| 49 | + return; # or Database*::select() will explode |
| 50 | + } |
48 | 51 | $dbr = wfGetDb( DB_SLAVE ); |
49 | 52 | $skin = $context->getSkin(); |
50 | 53 | $lang = $context->getLanguage(); |