Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2476,7 +2476,8 @@ |
2477 | 2477 | foreach ( (array) $modules as $name ) { |
2478 | 2478 | $module = $resourceLoader->getModule( $name ); |
2479 | 2479 | # Check that we're allowed to include this module on this page |
2480 | | - if ( ( $module->getOrigin() > $this->getAllowedModules( ResourceLoaderModule::TYPE_SCRIPTS ) |
| 2480 | + if ( !$module |
| 2481 | + || ( $module->getOrigin() > $this->getAllowedModules( ResourceLoaderModule::TYPE_SCRIPTS ) |
2481 | 2482 | && $only == ResourceLoaderModule::TYPE_SCRIPTS ) |
2482 | 2483 | || ( $module->getOrigin() > $this->getAllowedModules( ResourceLoaderModule::TYPE_STYLES ) |
2483 | 2484 | && $only == ResourceLoaderModule::TYPE_STYLES ) |
— | — | @@ -3127,7 +3128,11 @@ |
3128 | 3129 | } |
3129 | 3130 | |
3130 | 3131 | foreach ( $moduleStyles as $name ) { |
3131 | | - $group = $resourceLoader->getModule( $name )->getGroup(); |
| 3132 | + $module = $resourceLoader->getModule( $name ); |
| 3133 | + if ( !$module ) { |
| 3134 | + continue; |
| 3135 | + } |
| 3136 | + $group = $module->getGroup(); |
3132 | 3137 | // Modules in groups named "other" or anything different than "user", "site" or "private" |
3133 | 3138 | // will be placed in the "other" group |
3134 | 3139 | $styles[isset( $styles[$group] ) ? $group : 'other'][] = $name; |