Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -361,7 +361,8 @@ |
362 | 362 | } |
363 | 363 | |
364 | 364 | /** |
365 | | - * Filter an array of modules to remove insufficiently trustworthy members |
| 365 | + * Filter an array of modules to remove insufficiently trustworthy members, and modules |
| 366 | + * which are no longer registered (eg a page is cached before an extension is disabled) |
366 | 367 | * @param $modules Array |
367 | 368 | * @return Array |
368 | 369 | */ |
— | — | @@ -370,7 +371,9 @@ |
371 | 372 | $filteredModules = array(); |
372 | 373 | foreach( $modules as $val ){ |
373 | 374 | $module = $resourceLoader->getModule( $val ); |
374 | | - if( $module->getOrigin() <= $this->getAllowedModules( $type ) ) { |
| 375 | + if( $module instanceof ResourceLoaderModule |
| 376 | + && $module->getOrigin() <= $this->getAllowedModules( $type ) ) |
| 377 | + { |
375 | 378 | $filteredModules[] = $val; |
376 | 379 | } |
377 | 380 | } |